Computer-readable storage medium having game program stored therein, game apparatus, game system, and game processing method

ABSTRACT

Angular velocity data for specifying the position and the orientation of the first controller is inputted to a game apparatus. Based on the angular velocity data, the swing direction of the first controller is determined, and whether or not a sword object that acts in a virtual game space will collide with an enemy object is determined. If it has been determined that the sword object will collide with the enemy object, whether or not to perform hitting processing for the enemy object is determined based on the swing direction of the first controller.

CROSS REFERENCE TO RELATED APPLICATION

The disclosure of Japanese Patent Application No. 2010-115795, filed onMay 19, 2010, is incorporated herein by reference.

BACKGROUND

1. Field

Example embodiments of the present invention relate to: acomputer-readable storage medium having stored therein a game programwhich is executed by a computer of a game apparatus; a game apparatus; agame system; and a game processing method, and more particularly, to: acomputer-readable storage medium having stored therein a game programwhich is executed by a computer of a game apparatus which determines acollision between objects in a virtual game space and performs gameprocessing in accordance with a result of the determination; a gameapparatus; a game system; and a game processing method.

2. Description of the Background Art

In a so-called shooting game or action game, a player object thatappears in a virtual game space is moved in accordance with the movementof a controller operated by a player, and collision determination thatdetermines whether or not the player object has collided with anotherobject is performed (see, for example, Japanese Laid-Open PatentPublication No. 2008-173345, and Japanese Patent No. 4009433).

A game apparatus disclosed in Japanese Laid-Open Patent Publication No.2008-173345 detects the movement of a controller, based on accelerationdata outputted from an acceleration sensor included in the controller,and reflects the detected movement in game processing. Specifically, ifthe player has swung the controller, a sword object (player object) in avirtual game space is swung in the direction corresponding to the swingdirection of the controller. At this time, whether or not the swordobject has collided with a log object is determined. Then, if it hasbeen determined that the sword object has collided with the log object,the log object is cut in the direction corresponding to the swingdirection.

A game apparatus disclosed in Japanese Patent No. 4009433 includes a CCDcamera for detecting the position of a controller. The controller has anLED that emits infrared light. The game apparatus detects the positionof the controller by detecting the infrared light by using the CCDcamera, and reflects a result of the detection in game processing.Specifically, if the player has swung the controller, an action of asword object in a virtual game space such as swinging the sword orlunging with the sword is displayed on a screen. Along with this,whether or not the sword object has collided with, for example, an enemyobject is determined. Then, if it has been determined that the swordobject has collided with the enemy object, the degree of collision isdetermined based on the speed of the sword object, and which portion ofthe sword object has collided with the enemy object. Here, thedetermination of the degree of collision is to determine, in accordancewith an action of the sword object, which the collision results in that“only clothes have been cut”, “flesh of the enemy object has been cut”,or “the enemy object has been cut to the bone”.

Here, the conventional game apparatuses described above realisticallyrepresent a response made at the time when the sword object has collidedwith another object, based on the movement of the controller. However,the conventional game apparatuses cannot easily switch, in accordancewith the swing direction (operation direction) of the controller, therepresentation indicating a response made at the time when a collidingobject such as the sword object has collided with an object to becollided such as a log or an enemy.

SUMMARY OF THE INVENTION

Therefore, example embodiments of the present invention is to provide: acomputer-readable storage medium having stored therein a game programthat makes it possible to easily switch a representation indicating aresponse of an object to be collided with, in accordance with anoperation direction of an input apparatus; a game apparatus; a gamesystem; and a game processing method.

A computer-readable storage medium having stored therein a game programaccording to example embodiments of the present invention causes acomputer of a game apparatus to function as direction determinationmeans; collision determination means; and collision processingdetermination means, which game apparatus performs game processing,based on a state signal outputted by state detection means for detectingat least one of the position or the orientation of an input apparatus.The direction determination means determines an operation direction ofthe input apparatus, based on the state signal. The collisiondetermination means determines whether or not a first object that actsbased on the state signal in a virtual game space will collide with adetermination target. The collision processing determination means, ifthe collision determination means has determined that the first objectwill collide with the determination target, determines whether or not toperform hitting processing for the determination target, based on theoperation direction determined by the direction determination means.

The state of the input apparatus operated by the player is detected bythe state detection means. The state signal that is a result of thedetection performed by the state detection means is inputted to the gameapparatus. Based on the state signal, the game apparatus performs gameprocessing of moving a first object in a virtual game space operated bythe player, or changing the orientation of the first object. It is notedthat by the player changing the position and the orientation of theinput apparatus, the state signal inputted to the game apparatus ischanged. Therefore, by monitoring the change in the state signal, anoperation by the player of changing the position and the orientation ofthe input apparatus can be accurately reflected in the position and theorientation of the first object.

In such game processing, the game apparatus causes the collisiondetermination means to execute collision determination of determiningwhether or not the first object will collided with a determinationtarget. Here, the determination target is a determination area set for aso-called non-player object such as an enemy object with which the firstobject might collide in the virtual game space, or a weapon that theenemy object has. In addition to the collision determination, the gameapparatus determines an operation direction of the input apparatus (adirection in which the input apparatus has been moved), based on thestate signal. If the collision determination means has determined thatthe first object will collide with the determination target, thecollision processing determination means determines whether or not toperform hitting processing for the determination target, based on thedetermined operation direction of the input apparatus. Here, the hittingprocessing is processing for displaying, on a screen, a representationindicating that the first object has hit at the determination target. Ifit has been determined that the hitting processing is to be performed,for example, an animation indicating a scene in which a sword objectthat is the first object hits at the enemy object and the enemy objectis damaged is displayed on the screen. On the other hand, if it has beendetermined that the hitting processing is not to be performed, forexample, an animation indicating a scene in which the sword object thatis the first object is repelled by the enemy object is displayed on thescreen.

The game program may further cause the computer to function as positionrelation detection means for detecting a position relation between thefirst object and the determination target in the virtual game space. Inthis case, the collision processing determination means determineswhether or not to perform the hitting processing for the determinationtarget, based on the operation direction determined by the directiondetermination means, and the position relation detected by the positionrelation detection means.

In this configuration, whether or not to perform the hitting processingfor the determination target is determined in consideration of theposition relation between the first object and the determination target,in addition to the operation direction of the input apparatus.Therefore, even if the position relation between the first object andthe determination target has changed, whether or not to perform thehitting processing for the determination target can be appropriatelydetermined.

The game program may further cause the computer to function as priorityrank setting means for, if the collision determination means hasdetermined that the first object will collide with a plurality ofdetermination targets, setting priority ranks for the plurality ofdetermination targets, based on the operation direction determined bythe direction determination means, and the position relation detected bythe position relation detection means. In this case, the collisionprocessing determination means determines whether or not to perform thehitting processing for a determination target having the highestpriority rank among the plurality of determination targets.

This configuration makes it possible to, for example, set priority rankssuch that, among the plurality of determination targets, a priority rankof the determination target that the first object will first collidewith is the highest, and to determine whether or not to perform thehitting processing for the determination target having the highestpriority rank. Therefore, whether or not to perform the hittingprocessing can be appropriately determined for a determination targetfor which whether or not to perform the hitting processing should bedetermined.

The game program may further cause the computer to function as startdetermination means for determining whether or not an operation ofswinging the input apparatus has been started, based on the statesignal. In this case, the direction determination means determines theoperation direction of the input apparatus when the start determinationmeans has determined that an operation of swinging the input apparatushas been started.

This configuration makes it possible to determine whether or not toperform the hitting processing for the determination target, at anearlier timing than in the case where the operation direction of theinput apparatus is determined when the first object has collided withthe determination target. As a result, a time lag from when an operationof swinging the input apparatus is started, to when a representationupon collision is displayed on the screen, is reduced.

The state detection means may include an angular velocity sensor, andthe state signal may include angular velocity data outputted by theangular velocity sensor.

This configuration makes it possible to perform more accurately thedetermination of the operation direction of the input apparatus, and thedetermination of whether or not the first object will collide with thedetermination target, than in the case of using, for example, anacceleration sensor as the state detection means. As a result, whetheror not to perform the hitting processing for the determination target ismore accurately determined.

The present invention may be realized as a game apparatus which performsgame processing, based on a state signal outputted by state detectionmeans for detecting at least one of the position or the orientation ofan input apparatus. The game apparatus comprises: directiondetermination means; collision determination means; and collisionprocessing determination means. The direction determination meansdetermines an operation direction of the input apparatus, based on thestate signal. The collision determination means determines whether ornot a first object that acts based on the state signal in a virtual gamespace will collide with a determination target. The collision processingdetermination means, if the collision determination means has determinedthat the first object will collide with the determination target,determines whether or not to perform hitting processing for thedetermination target, based on the operation direction determined by thedirection determination means.

Example embodiments of present invention may be realized as a gameapparatus which performs game processing, based on a state signaloutputted by state detection means for detecting at least one of theposition or the orientation of an input apparatus. The game apparatuscomprises: direction determination means; collision determination means;and collision processing determination means. The directiondetermination means determines an operation direction of the inputapparatus, based on the state signal. The collision determination meansdetermines whether or not a first object that acts based on the statesignal in a virtual game space will collide with a determination target.The collision processing determination means, if the collisiondetermination means has determined that the first object will collidewith the determination target, determines whether or not to performhitting processing for the determination target, based on the operationdirection determined by the direction determination means.

In addition, example embodiments of the present invention may berealized as a game system which performs game processing, based on astate signal outputted by state detection means for detecting at leastone of the position or the orientation of an input apparatus. The gamesystem comprises: direction determination means; collision determinationmeans; and collision processing determination means. The directiondetermination means determines an operation direction of the inputapparatus, based on the state signal. The collision determination meansdetermines whether or not a first object that acts based on the statesignal in a virtual game space will collide with a determination target.The collision processing determination means, if the collisiondetermination means has determined that the first object will collidewith the determination target, determines whether or not to performhitting processing for the determination target, based on the operationdirection determined by the direction determination means.

In addition, example embodiments of the present invention may berealized as a game processing method in which, for example, a computerof a game apparatus performs game processing, based on a state signaloutputted by state detection means for detecting at least one of theposition or the orientation of an input apparatus. The game processingmethod determines an operation direction of the input apparatus, basedon the state signal. In addition, the game processing method determineswhether or not a first object that acts based on the state signal in avirtual game space will collide with a determination target. Moreover,the game processing method, if the collision determination means hasdetermined that the first object will collide with the determinationtarget, determines whether or not to perform hitting processing for thedetermination target, based on the operation direction that has beendetermined.

It is noted that the determination of the operation direction of theinput apparatus may be performed before the collision determination ofwhether or not the first object will collide with the determinationtarget, or may be performed after the collision determination.

In example embodiments of the present invention, since whether or not toperform the hitting processing for the determination target isdetermined in accordance with the operation direction of the inputapparatus, it is possible to easily switch a representation indicating aresponse of an object to be collided with, in accordance with theoperation direction of the input apparatus.

These and other features, aspects and advantages of example embodimentsof the present invention will become more apparent from the followingdetailed description of example embodiments of the present inventionwhen taken in conjunction with the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a perspective view of an external configuration of a gamesystem 1 including a game apparatus 3 according to one embodiment of thepresent invention;

FIG. 2 is a perspective view of a first controller 7 and a gyro sensorunit 9 as seen from a top rear side thereof;

FIG. 3 is a perspective view of the first controller 7 as seen from abottom front side thereof;

FIGS. 4A and 4B are perspective views of a second controller 8;

FIG. 5 is a block diagram showing a configuration of the game apparatus3;

FIG. 6 is a block diagram showing an internal configuration of acontroller 5;

FIG. 7 is a perspective view of the first controller 7 and the gyrosensor unit 9, for explaining a roll angle, a pitch angle, and a yawangle around which accelerations are detected by the gyro sensor unit 9;

FIG. 8 is an explanation view exemplifying a state in which the playerholds the first controller 7 and the second controller 8;

FIG. 9 is a screen view showing an example of a game image displayed ona liquid crystal television 2;

FIG. 10 is a screen diagram showing an example of an animation displayedon the liquid crystal television 2 when the player has swung the firstcontroller 7 from left to right;

FIG. 11 is a screen diagram showing an example of an animation displayedon the liquid crystal television 2 when the player has swung the firstcontroller 7 from right to left;

FIG. 12 is a diagram exemplifying a memory map of an external mainmemory 12;

FIG. 13 is a flowchart showing an example of a main process to beexecuted by the game apparatus 3;

FIG. 14 is an explanation diagram for explaining a swing direction ofthe first controller 7 performed by the player;

FIG. 15 is a flowchart showing, in detail, ready processing in step S9in FIG. 13;

FIG. 16 is a flowchart showing, in detail, attack start processing instep S10 in FIG. 13;

FIG. 17 is a flowchart showing, in detail, collision determinationprocessing in step S12 in FIG. 13;

FIG. 18 is a flowchart showing in detail the collision determinationprocessing in step S12 in FIG. 13;

FIG. 19 is a screen view showing an example of an animation displayed onthe liquid crystal television 2 in the case where the player has swungthe first controller 7 from left to right;

FIG. 20 is a screen view showing an example of an animation displayed onthe liquid crystal television 2 in the case where the player has swungthe first controller 7 from right to left;

FIG. 21 is a screen view showing an example of an animation displayed onthe liquid crystal television 2 in the case where the player has swungthe first controller 7 from right to left;

FIG. 22 is a screen view showing an example of an animation displayed onthe liquid crystal television 2 in the case where the player has swungthe first controller 7 from right to left;

FIG. 23 is a flowchart showing a modification of the collisiondetermination processing;

FIG. 24 is a screen view showing an example of an animation displayed onthe liquid crystal television 2 in the case where the player has swungthe first controller 7 from right to left;

FIG. 25 is a screen view showing an example of an animation displayed onthe liquid crystal television 2 in the case where the player has swungthe first controller 7 from left to right; and

FIG. 26 is a screen view showing an example of an animation displayed onthe liquid crystal television 2 in the case where the player has swungthe first controller 7 from right to left.

DESCRIPTION OF THE EXAMPLE EMBODIMENTS

In the following, an embodiment of the present invention will bedescribed with reference to the drawings as appropriate. FIG. 1 is anexternal perspective view of a game system 1 which includes a gameapparatus 3 according to an embodiment of the present invention. In thepresent embodiment, the present invention will be described taking as anexample a case where a game apparatus is the game apparatus 3 ofstationary type. However, the game apparatus may be, for example, aportable type game apparatus in which a game apparatus and a displaydevice are integrally formed.

[Whole Configuration of Game System 1]

Firstly, an overview of components of the game system 1 will bedescribed. In FIG. 1, the game system 1 includes a liquid crystaltelevision 2, the game apparatus 3, an optical disc 4, a marker unit 6,and a controller 5. In the game system 1, the game apparatus 3 executesa game process based on a game operation performed by a player using thecontroller 5.

The optical disc 4, which is an exemplary information storage mediumchangeable with respect to the game apparatus 3, is detachably loadedinto the game apparatus 3. A game program that is executed in the gameapparatus 3 is stored on the optical disc 4. On a front surface of thegame apparatus 3, a slot through which the optical disc 4 is inserted isprovided. The game apparatus 3 executes a game process by reading andexecuting the game program stored on the optical disc 4 which has beeninserted through the slot.

The liquid crystal television 2 is connected via a connection cord tothe game apparatus 3. As will be described later, the game apparatus 3generates an image (hereinafter, referred to as a game image) of avirtual game space including an object seen from a viewpoint of avirtual camera placed in the virtual game space, and outputs the imageto the liquid crystal television 2. This series of processes areperformed in units of a frame (e.g., at intervals of 1/60 sec) in thisembodiment. The liquid crystal television 2 receives a game imageoutputted from the game apparatus 3 in this manner, and displays thegame image on a screen.

The marker unit 6 is provided in the vicinity of the screen of theliquid crystal television 2 (on an upper side of the screen in FIG. 1).The marker unit 6 comprises two markers 6R and 6L at both ends thereof.Specifically, the marker 6R includes one or more infrared LEDs thatoutput infrared light toward the front of the liquid crystal television2 (the same is true of the marker 6L). The marker unit 6 is connected tothe game apparatus 3, so that the game apparatus 3 can control ON/OFF ofeach infrared LED included in the marker unit 6. The marker unit 6 isalso provided with a microphone (not shown). Audio information inputtedthrough the microphone is inputted to the game apparatus 3.

The controller 5 is input means that is operated by the player. In thepresent embodiment, the controller 5 includes a first controller 7 and asecond controller 8 each of which can be held by the player with onehand of the player, and a gyro sensor unit 9 that is attached, in adetachable manner, to the first controller 7. The first controller 7 isan input apparatus that is operated by the player. The first controller7 generates operation data indicating a content of an operationperformed with respect to the first controller 7. The gyro sensor unit 9functions as state detection means that detects the position and theorientation of the first controller 7, with the gyro sensor unit 9 beingattached to the first controller 7. The gyro sensor unit 9 detects theangular velocity of the first controller 7, and outputs angular velocitydata indicating the detected angular velocity, to the first controller7. Here, the angular velocity data is a state signal for specifying theposition and the orientation of the first controller 7, which indicatesthe state of the first controller 7. The second controller 8 generatesoperation data indicating an operation performed with respect to itself.The operation data is outputted to the first controller 7 via the gyrosensor unit 9. The first controller 7 transmits, to the game apparatus3, controller data including the operation data of the first controller7, the operation data of second controller 8, the angular velocity dataof the gyro sensor unit 9, and the like.

The first controller 7 and the game apparatus 3 are connected viawireless communication, for transmission of the controller data. In thisembodiment, for example, the Bluetooth (registered trademark) technologyis used for wireless communication between the first controller 7 andthe game apparatus 3. Note that, in another embodiment, the firstcontroller 7 and the game apparatus 3 may be connected via wiredcommunication.

[External Configuration of First Controller 7]

FIG. 2 is a perspective view of the first controller 7 and the gyrosensor unit 9 as seen from a top rear side thereof. FIG. 3 is aperspective view of the first controller 7 as seen from a bottom frontside thereof.

As shown in FIG. 2 and FIG. 3, the first controller 7 includes a housing71 which is formed by, for example, plastic molding. The housing 71 hasa generally parallelepiped shape extending in a longitudinal direction(Z-axis direction in FIG. 2 and FIG. 3) from front to rear. The overallsize of the housing 71 is small enough to be held by one hand of anadult or even a child. An operation section 72 is placed on the housing71.

An operation section 72 provided on the upper surface of the housing 71includes a cross key 72 a, operation buttons 72 b to 72 g, and anoperation button 72 h.

The cross key 72 a is a cross-shaped four-direction push switch. Thecross key 72 a includes operation portions corresponding to fourdirections (front, rear, right and left), which are respectively locatedon cross-shaped projecting portions so as to be arranged at intervals of90 degrees. A player selects one of the front, rear, right and leftdirections by pressing one of the operation portions of the cross key 72a. Through an operation of the cross key 72 a, the player can, forexample, select an option from a plurality of options.

Each of the operation buttons 72 b to 72 g outputs a correspondingoperation signal when the player presses a head the operation button.For example, functions as a number one button, a number two button andan A button are assigned to the operation buttons 72 b to 72 d,respectively. Also, functions as a minus button, a home button and aplus button are assigned to the operation buttons 72 e to 72 g,respectively. Operation functions are assigned to the operation buttons72 b to 72 g in accordance with the game program executed by the gameapparatus 3. It is noted that the operation button 72 f has a topsurface thereof buried in the top surface of the housing 71, so as notto be inadvertently pressed by the player.

The operation button 72 h is a power switch for turning on and off thepower to the game apparatus 3 by remote control. The operation button 72h has a top surface thereof buried in the top surface of the housing 71,and is an operation button of the same type as the operation button 72f.

Besides the operation section 72, a plurality of LEDs 702 are providedon the upper surface of the housing 71. Here, controller types (numbers)are assigned to the first controllers 7 such that the first controllers7 are distinguishable from each other. The LEDs 702 are used for, forexample, informing the player of the controller type which is currentlyset for the first controller 7. More specifically, when the firstcontroller 7 transmits controller data to the wireless controller module19 (see FIG. 5), one of the plurality of LEDs 702 which corresponds tothe controller type of the first controller 7 is lit up.

On the top surface of the housing 71, a plurality of holes 711 areprovided between the operation button 72 b and the operation buttons 72e to 72 g for emitting sound from a speaker 706 included in the housing71 (see FIG. 6).

As shown in FIG. 3, a recessed portion is formed on a bottom surface ofthe housing 71. The recessed portion is formed in a position in which anindex finger or middle finger of the player is located when the playerholds the first controller 7 such that the front surface thereof facesthe makers 6L and 6R. On the rear side of a slope surface of therecessed portion, an operation button 72 i is provided. The operationbutton 72 i outputs an operation signal assigned to the operation button72 i by the player pressing the head of the operation button 72 i, andfunctions as, for example, a B button.

On a front surface of the housing 71, an imaging device 743 (see FIG. 6)constituting a part of an imaging information calculation section 74(see FIG. 3) is provided. The imaging information calculation section 74is a system for analyzing image data of an image taken by the firstcontroller 7, thereby identifying an area having a high brightness inthe image and detecting a position of a center of gravity, a size andthe like of the area. The imaging information calculation section 74has, for example, a maximum sampling period of about 200 frames/sec, andtherefore can trace and analyze even a relatively fast motion of thefirst controller 7. A configuration of the imaging informationcalculation section 74 will be described later in detail. On a rearsurface of the housing 71, a connector 73 (see FIG. 2) is provided. Theconnector 73 is, for example, an edge connector.

[External Configuration of Gyro Sensor Unit 9]

Though not shown in FIG. 2, a connector 91 (see FIG. 6) that can beconnected to the connector 73 of the first controller 7 is provided tothe front surface of the gyro sensor unit 9. When the connector 91 isconnected to the connector 73, the gyro sensor unit 9 is physically andelectrically connected to the first controller 7. The gyro sensor unit 9detects angle velocities around three axes (X-axis, Y-axis, and Z-axis)of the first controller 7 while the gyro sensor unit 9 and the firstcontroller 7 being unified. After the angular velocities of the firstcontroller 7 have been detected, angular velocity data indicating thedetection result is outputted from the gyro sensor unit 9 to the firstcontroller 7.

A connector 92 (see FIG. 6) that can be connected to the connector 82(see FIG. 1) of the second controller 8 is provided to the rear surfaceof the gyro sensor unit 9. When the connector 82 is connected to theconnector 92, the second controller 8 is connected to the firstcontroller 7 via the gyro sensor unit 9. It is noted that FIG. 2 shows astate where a connector cover 93 is attached to the connector 92, andtherefore, the connector 92 is not shown.

Release buttons 94 are provided at the side surfaces of the gyro sensorunit 9. The gyro sensor unit 9 includes hooks projecting from the frontsurface of the gyro sensor unit 9, which are not shown. When the gyrosensor unit 9 is to be attached to the first controller 7, the hooks areinserted into the housing 71 via holes 76 (see FIG. 2) formed on therear surface of the housing 71, and then the hooks are engaged with theinner wall of the housing 71. Thus, the gyro sensor unit 9 is fixed tothe first controller 7. The release buttons 94 are interlinked with thehooks. The player can detach the gyro sensor unit 9 from the firstcontroller 7 by pulling out the hooks from the housing 71 while pressingthe release button 94.

[External configuration of Second Controller 8]

The connector 82 (see FIG. 1) of the second controller 8 can beconnected to the connector 73 (see FIG. 2 and FIG. 6) of the firstcontroller 7, or the connector 92 (see FIG. 6) of the gyro sensor unit9. When the connector 82 is connected to the connector 73, operationdata from the second controller 8 is directly inputted to the firstcontroller 7 via a cable 81 and the connector 82. On the other hand,when the connector 91 is connected to the connector 73, and theconnector 82 is connected to the connector 92, operation data from thesecond controller 8 is inputted to the first controller 7 via the cable81, the connector 82, and the gyro sensor unit 9.

FIG. 4 is a perspective view of the second controller 8. FIG. 4(A) is aperspective view of the second controller 8 as seen from a top rear sidethereof, and FIG. 4(B) is a perspective view of the second controller 8as seen from a bottom front side thereof. It is noted that in FIG. 4,the cable 81 and the connector 82 of the second controller 8 are notshown.

The second controller 8 has a housing 83 formed by, for example, plasticmolding. The housing 83 has an elliptic shape elongating in thedirection (Z-axis direction in FIG. 4) from front to rear. The width, onthe rear side, in the horizontal direction (X-axis direction), of thehousing 83 is narrower than the width on the front side in thehorizontal direction. In addition, as the side surface of the housing 83is seen, the housing 83 has a curved shape as a whole such that theshape curves down from the front portion of the housing 83 which extendsin the horizontal direction, to the rear portion. The overall size ofthe housing 83 is small enough to be held by one hand of an adult oreven a child as in the housing 71 of the first controller 7. The lengthin the longitudinal direction (Z-axis direction) of the housing 83 isset to be slightly smaller than that of the housing 71. An operationsection 84 is provided to the housing 83.

An analog joystick 84 a is provided, as the operation section 84, on thefront side of the top surface of the housing 83. In addition, a C-button84 b and a Z-button 84 c are provided on the front surface of thehousing 83. Operation functions are assigned to the analog joystick 84a, the C-button 84 b, and the Z-button 84 c in accordance with the gameprogram executed by the game apparatus 3. The player can perform a gameoperation by inclining the analog joystick 84 a or pressing the buttons84 b and 84 c.

[Internal Configuration of Game Apparatus 3]

Next, an internal configuration of the game apparatus 3 will bedescribed with reference to FIG. 5. FIG. 5 is a block diagram showingthe configuration of the game apparatus 3. The game apparatus 3 has aCPU 10, a system LSI 11, an external main memory 12, a ROM/RTC 13, adisc drive 14, an AV-IC 15, and the like.

The CPU 10 executes a game program stored on the optical disc 4 toperform the game process, i.e., functions as a game processor. The CPU10 is connected to the system LSI 11. In addition to the CPU 10, theexternal main memory 12, the ROM/RTC 13, the disc drive 14, and theAV-IC 15 are connected to the system LSI 11. The system LSI 11 performsprocesses, such as controlling data transfer between each componentconnected thereto, generating an image to be displayed, obtaining datafrom an external apparatus, and the like. An internal configuration ofthe system LSI 11 will be described below.

The external main memory 12 is a volatile memory. The external mainmemory 12 stores a program, such as a game program read out from theoptical disc 4, a game program read out from a flash memory 17, or thelike, or various kinds of data, and is used as a work area, a bufferarea or the like for the CPU 10.

The ROM/RTC 13 has a ROM (so-called boot ROM) which stores a program forbooting the game apparatus 3, and a clock circuit (RTC: Real Time Clock)which counts time.

The disc drive 14 reads out program data, texture data or the like fromthe optical disc 4, and writes the read data into an internal mainmemory 11 e (described below) or the external main memory 12.

The system LSI 11 also includes an input/output processor (I/Oprocessor) 11 a, a GPU (Graphics Processor Unit) 11 b, a DSP (DigitalSignal Processor) 11 c, a VRAM 11 d, and the internal main memory 11 e.The components 11 a to 11 e are connected to each other via an internalbus (not shown).

The GPU 11 b, which is a part of a drawing means, generates an image inaccordance with a graphics command (image drawing command) from the CPU10. The VRAM 11 d stores data (e.g., polygon data, texture data, etc.)which is required by the GPU 11 b to execute the graphics command. Whenan image is generated, the GPU 11 b generates image data using datastored in the VRAM 11 d.

The DSP 11 c, which functions as an audio processor, generates audiodata using sound data, sound waveform (tone color) data or the likestored in the internal main memory 11 e, the external main memory 12 orthe like.

The image data and audio data thus generated are read out by the AV-IC15. The AV-IC 15 outputs the read image data via an AV connector 16 tothe liquid crystal television 2, and the read audio data to aloudspeaker 2 a built in the liquid crystal television 2. Thereby, animage is displayed on the liquid crystal television 2 while a sound isoutputted from the loudspeaker 2 a.

The input/output processor 11 a executes data transmission and receptionbetween components connected thereto, or downloads data from an externalapparatus. The input/output processor 11 a is connected to the flashmemory 17, a wireless communication module 18, a wireless controllermodule 19, an extension connector 20, and a memory card connector 21. Anantenna 22 is connected to the wireless communication module 18, and anantenna 23 is connected to the wireless controller module 19.

The input/output processor 11 a is connected via the wirelesscommunication module 18 and the antenna 22 to a network, and cancommunicate with other game apparatuses or various servers connected tothe network. The input/output processor 11 a regularly accesses theflash memory 17 to detect the presence or absence of data that needs tobe transmitted to the network. In the case of the presence of the data,the input/output processor 11 a transmits the data via the wirelesscommunication module 18 and the antenna 22 to the network. Theinput/output processor 11 a also receives data transmitted from anothergame apparatus or data downloaded from a download server via thenetwork, the antenna 22, and the wireless communication module 18, andstores the received data into the flash memory 17. The CPU 10 executes agame program to read out the data stored in the flash memory 17 andutilizes the data in the game program. In addition to data communicatedbetween the game apparatus 3 and other game apparatuses or variousservers, save data (result data or intermediate data of a game) of agame played using the game apparatus 3 may be stored into the flashmemory 17.

The input/output processor 11 a also receives controller datatransmitted from the controller 7 via the antenna 23 and the wirelesscontroller module 19, and stores (temporarily stores) the controllerdata into a buffer area of the internal main memory 11 e or the externalmain memory 12.

Also, the extension connector 20 and the memory card connector 21 areconnected to the input/output processor 11 a. The extension connector 20is a connector for interface, such as USB or SCSI. When a medium (e.g.,an external storage medium, etc.), a peripheral device (e.g., anothercontroller, etc.), or a wired communication connector is connected tothe extension connector 20, communication with a network can beperformed without using the wireless communication module 18. The memorycard connector 21 is a connector for connecting an external storagemedium, such as a memory card or the like. For example, the input/outputprocessor 11 a can access an external storage medium via the extensionconnector 20 or the memory card connector 21 to save data or read outdata.

The game apparatus 3 is provided with a power button 24, a reset button25, and an eject button 26. The power button 24 and the reset button 25are connected to the system LSI 11. When the power button 24 is presseddown, power is supplied via an AC adaptor (not shown) to each componentof the game apparatus 3. When the reset button 25 is pressed down, thesystem LSI 11 reboots the boot program of the game apparatus 3. Theeject button 26 is connected to the disc drive 14. When the eject button26 is pressed down, the optical disc 4 is ejected from the disc drive14.

[Internal Configuration of Controller 5]

Next, an internal structure of the controller 5 will be described withreference to FIG. 6. FIG. 6 is a block diagram showing the internalconfiguration of the controller 5. It is noted that FIG. 6 shows a statein which the gyro sensor unit 9 is connected to the first controller 7,and the second controller 8 is connected to the gyro sensor unit 9.

As shown in FIG. 6, the first controller 7 has, in addition to theabove-described operation portion 72, the image capture informationcomputing section 74, an acceleration sensor 701, a vibrator 704, aloudspeaker 706, a sound IC 707, an amplifier 708, and a communicationsection 75.

The image capture information computing section 74 includes an infraredfilter 741, a lens 742, the image capturing element 743, and an imageprocessing circuit 744. The infrared filter 741 allows, among lightsincident on the front surface of the first controller 7, only aninfrared light to pass therethrough. The lens 742 converges the infraredlight which has passed through the infrared filter 741, and causes theinfrared light to enter the image capturing element 743. The imagecapturing element 743 is a solid-state image capturing element such as aCMOS sensor or a CCD sensor. The image capturing element 743 receivesthe infrared light converged by the lens 742, and outputs an imagesignal. Here, an infrared light is emitted toward the front of theliquid crystal television 2 from the markers 6R and 6L of the markersection 6 fixed to the liquid crystal television 2. Therefore, by theinfrared filter 741 being provided, the image capturing element 743receives only an infrared light that has passed through the infraredfilter 741, to generate image data. Thus, the image capturing element743 can shoot a precise image of the markers 6R and 6L. Hereinafter, animage shot by the image capturing element 743 is referred to as a shotimage. The image data generated by the image capturing element 743 isprocessed by the image processing circuit 744. The image processingcircuit 744 calculates the positions of the shot objects (markers 6R and6L) in the shot image. The image processing circuit 744 outputscoordinates indicating the calculated positions to the microcomputer 751of the communication section 75. The coordinate data is transmitted, asoperation data, to the game apparatus 3 by the microcomputer 751.Hereinafter, the above coordinates are referred to as “markercoordinates”. Since the marker coordinates vary in accordance with thedirection (inclination angle) and the position of the first controller7, the game apparatus 3 can calculate the direction and the position ofthe first controller 7 by using the marker coordinates.

The acceleration sensor 701 detects the direction and the position ofthe first controller 7. The acceleration sensor 701 detects linearaccelerations in three directions, i.e., an up-down direction (theY-axis shown in FIG. 2), a left-right direction (the X-axis directionshown in FIG. 2), and a front-rear direction (the Z-axis direction shownin FIG. 2). A state signal (acceleration data) indicating theaccelerations detected by the acceleration sensor 701 is outputted tothe communication section 75, and then the communication section 75transmits the state signal to the game apparatus 3. Since theaccelerations detected by the acceleration sensor 701 vary in accordancewith the direction (inclination angle) and the motion of the firstcontroller 7, the game apparatus 3 can calculate the position and theorientation of the first controller 7, based on the acceleration data.In the present embodiment, the game apparatus 3 calculates the positionand the orientation of the first controller 7, based on angular velocitydata described later. However, the game apparatus 3 can also calculatethe position and the orientation of the first controller 7, based on theacceleration data.

The communication section 75 includes a microcomputer 751, a memory 752,a wireless module 753, and the antenna 754. The microcomputer 751controls the wireless module 753 for wirelessly transmittingtransmission data while using the memory 752 as a storage area during aprocess. Also, the microcomputer 751 controls operations of the sound IC707 and the vibrator 704, depending on data from the game apparatus 3which is received by the wireless module 753 via the antenna 754. Sincethe controller 7 includes the wireless module 753 and the antenna 754,the first controller 7 functions as a wireless controller.

The sound IC 707 processes sound data or the like transmitted from thegame apparatus 3 via the communication section 75. The sound data isamplified by the amplifier 708 and transmitted to the loudspeaker 706,so that a sound is outputted from the loudspeaker 706. The vibrator 704is, for example, a vibration motor or a solenoid. The vibrator 704 isactuated in accordance with vibration data (e.g. a signal for turning ONor OFF the vibrator 704), or the like, transmitted from the gameapparatus 3 via the communication section 75. The activation of thevibrator 704 generates vibration in the controller 7, so that thevibration is transferred to a player's hand holding the first controller7, thereby making it possible to achieve a so-called vibration-featuresupporting game.

The second controller 8 includes the operation section 84 and anacceleration sensor 85, as shown in FIG. 6. For example, a 3-axisacceleration sensor is applied to the acceleration sensor 85. Theacceleration sensor 85 detects linear accelerations in three-axisdirections, i.e., an up-down direction (the Y-axis shown in FIG. 4), aleft-right direction (the X-axis direction shown in FIG. 4) and afront-rear direction (the Z-axis direction shown in FIG. 4).Acceleration data indicating the accelerations detected by theacceleration sensor 85 is sent to the first controller 7, and then thecommunication section 75 transmits the acceleration data to the gameapparatus 3. Since the accelerations detected by the acceleration sensor85 vary in accordance with the direction (inclination angle) and themotion of the second controller 8, the game apparatus 3 can calculatethe position and the orientation of the second controller 8, based onthe acceleration data from the acceleration sensor 85, as in the firstcontroller 7.

The operation section 84 includes the analog joystick 84 a, the C-button84 b, and the Z-button 84 c described above. When the operation section84 is operated, operation data indicating the content of the operationis generated. The operation data is sent to the gyro sensor unit 9 viathe cable 81, the connector 82, and the connector 92. In addition, theacceleration data indicating the accelerations of the second controller8 detected by the acceleration sensor 85 is also sent to the gyro sensorunit 9 in the same manner. The operation data and the acceleration dataare sent to the communication section 75 of the first controller 7 bythe gyro sensor unit 9.

The gyro sensor unit 9 detects angular velocities around three axes(X-axis, Y-axis, and Z-axis, in the present embodiment), and outputsangular velocity data indicating the detected angular velocities to thefirst controller 7. The gyro sensor unit 9 includes, in its inside, amicrocomputer 95, a 2-axis gyro sensor (angular velocity sensor) 96, anda 1-axis gyro sensor (angular velocity sensor) 97, as shown in FIG. 6.

FIG. 7 is a perspective view of the first controller 7 and the gyrosensor unit 9, for explaining a roll angle, a pitch angle, and a yawangle around which accelerations are detected by the gyro sensor unit 9.The 2-axis gyro sensor 96 detects two angular velocities (per unit oftime) with respect to the roll angle and the pitch angle, that is,detects an angular velocity around the Z-axis and an angular velocityaround the X-axis. The 1-axis gyro sensor 97 detects an angularvelocities (per unit of time) with respect to the yaw angle, that is,detects an angular velocity around the Y-axis. It is noted that in thepresent specification, as shown in FIG. 7, rotation directions aroundthe Z-axis, X-axis, and Y-axis are referred to as a roll direction, apitch direction, and a yaw direction, respectively, with the positivedirection of the Z-axis, which is the shooting direction of the firstcontroller 7, being set as a reference.

Data indicating the angular velocities detected by the 2-axis gyrosensor 96 and the 1-axis gyro sensor 97 are outputted to themicrocomputer 95. Therefore, data indicating the angular velocitiesaround the three axes of the X, Y, and Z axes are inputted to themicrocomputer 95. The microcomputer 95 outputs the data representing theangular velocities around the three axes, as angular velocity data, tothe first controller 7 via the connector 91. The data transmission fromthe microcomputer 95 to the first controller 7 is sequentially performedat a predetermined cycle, and the game is typically processed at a cycleof 1/60 seconds (corresponding to one frame time), and the transmissionis preferably performed at a cycle shorter than a cycle of 1/60 seconds.Though being described later, the angular velocity data is transmittedfrom the first controller 7 to the game apparatus 3. Since the angularvelocities of the first controller 7 detected by the gyro sensor unit 9vary in accordance with the direction (inclination angle) and the motionof the first controller 7, the game apparatus 3 can accurately calculatethe position and the orientation of the first controller 7, based on theangular velocity data.

The first controller 7 will be described again. The memory 752temporarily stores the operation data from the operation section 72, themarker coordinates from the imaging information calculation section 74,and the acceleration data of the acceleration sensor 701. In addition,since the gyro sensor unit 9 is attached to the first controller 7, thememory 752 temporarily stores the angular velocity data (state signal ofthe first controller 7) sent from the t-axis gyro sensor 96 and the1-axis gyro sensor 97. In addition, since the second controller 8 isconnected to the first controller 7 via the gyro sensor unit 9, thememory 752 temporarily stores the operation data from the operationsection 84, and the acceleration data from the acceleration sensor 85.When timing of transmission to the wireless controller module 19 (seeFIG. 5) of the game apparatus 3 arrives, the microcomputer 751 outputsdata stored in the memory 752, as the above control data, to thewireless module 753. Thereafter, the wireless module 753 modulates acarrier wave of a predetermined frequency with the controller data byusing, for example, the Bluetooth technique, and emits the resultant lowpower radio wave signal from the antenna 45. That is, the controllerdata is modulated onto the low power radio wave signal by the wirelessmodule 753 and transmitted from the first controller 7. The wirelesscontroller module 19 of the game apparatus 3 receives the low powerradio wave signal. The game apparatus 3 demodulates or decodes thereceived low power radio wave signal, and thereby can obtain theoperation data. Based on the obtained controller data and the gameprogram, the CPU 10 of the game apparatus 3 performs the gameprocessing.

It is noted that the wireless transmission from the communicationsection 75 to the wireless controller module 19 is sequentiallyperformed at a predetermined time interval. Since game process isgenerally performed at a cycle of 1/60 sec. (corresponding to one frametime), data is preferably transmitted at a cycle of a shorter timeperiod. The communication section 75 of the first controller 7 transmitsthe controller data at intervals of, for example, 1/200 seconds, to thewireless controller module 19 of the game apparatus 3.

The above-described controller 5 allows the player to perform an inputto an application such as a game not only by conventional buttonoperation of pressing each operation button, but also by moving thecontroller 5 itself. When the player plays a game, the player holds thefirst controller 7 with the right hand, and holds the second controller8 with the left hand, as shown in FIG. 8. As described above, the firstcontroller 7 includes the acceleration sensor 701, and the gyro sensorunit 9 is fixed to the first controller 7. In addition, the secondcontroller 8 includes the acceleration sensor 85. When the firstcontroller 7 is moved by the player, the acceleration sensor 701 detectsaccelerations in three-axis directions of the first controller 7, the2-axis gyro sensor 96 and the 1-axis gyro sensor 97 of the gyro sensorunit 9 detect angular velocities around three axes of the firstcontroller 7. On the other hand, when the second controller 8 is movedby the player, the acceleration sensor 85 detects accelerations inthree-axis directions of the second controller 8. Data indicating thesedetection results is transmitted, as controller data, to the gameapparatus 3 as described above, whereby the data is reflected in gameprocessing. Thus, the player can perform a game operation such asswinging the first controller 7 and the second controller 8.

It is noted that the configuration of the hardware described above ismerely an example. The configurations of the game apparatus 3 and thecontroller 5 can be changed as appropriate.

[Outline of Game]

Next, with reference to FIG. 9 to FIG. 11, an outline of a game that isprogressed by the CPU 10 of the game apparatus 3 executing a gameprogram will be described.

A game executed in the present embodiment is an action adventure game inwhich the player operates a player object 101 and a sword object 104placed in a virtual game space (virtual 3-dimensional space) to defeatan enemy. FIG. 9 is a screen view showing an example of a game imagedisplayed on the liquid crystal television 2. As shown in FIG. 9, ascene in which the player object 101 which is operated by the player hasencountered enemy objects 102 is displayed on the liquid crystaltelevision 2. The player can move the player object 101 by operating theanalog joystick 84 a (see FIG. 8) of the second controller 8.

For example, when the player object 101 has moved to a position wherethe player object 101 can attack the enemy object 102, a scene in whichthe player object 101 draws the sword object 104 (one example of firstobjects) on the back of the player object 101 from a scabbard and getsready with the sword object 104 is displayed on the liquid crystaltelevision 2, though not shown in FIG. 9. At this time, if there are aplurality of enemy objects 102 that the player object 101 can attack, acursor 103 is displayed such that the cursor 103 overlaps with one ofthe plurality of enemy objects 102. The cursor 103 is used for switchingan enemy object to be attacked by the player object 101. For example,when the Z-button 84 c of the second controller 8 is pressed, the cursor103 is displayed such that the cursor 103 overlaps with another enemyobject 102 different from the enemy object 102 with which the cursor 103overlapped before the button operation. Thus, if there are a pluralityof enemy objects 102 that the player object 101 can attack, the playercan switch the enemy object 102 to be attacked, by pressing the Z-button84 c. It is noted that even if one of enemy objects is selected asdescribed above, in the case where the sword object 104 collides with aplurality of the enemy objects when the sword object 104 has been swung,it is possible to attack all of the plurality of enemy objects.

The player gets ready with the first controller 7 while using the firstcontroller 7 as a sword, and thereby can cause the player object 101 toget ready with the sword object 104. In addition, the player performs anoperation (game operation) of swinging the first controller 7 in anyswing direction (operation direction) from the state in which the playeris ready with the first controller 7, and thereby can cause the playerobject 101 to perform an attack action of striking the enemy object 102with the sword object 104. It is noted that since the position and theorientation of the first controller 7 are detected by the gyro sensorunit 9, the player can cause the player object 101 to swing the swordobject 104 in the same direction as the player swings the firstcontroller 7.

FIG. 10 is a screen diagram showing an example of an animation displayedon the liquid crystal television 2 when the player has swung the firstcontroller 7 from left to right. FIG. 11 is a screen diagram showing anexample of an animation displayed on the liquid crystal television 2when the player has swung the first controller 7 from right to left. Ifthe player has swung the first controller 7 from left to right, as shownin FIG. 10, an animation (a moving image indicating a motion blureffect) indicating a scene in which the sword object 104 hits at theenemy object 102 and damages the enemy object 102 is displayed. On theother hand, if the player has swung the first controller 7 from right toleft, as shown in FIG. 11, an animation indicating a scene in which thesword object 104 is repelled without hitting at the enemy object 102 isdisplayed. Thus, a feature of example embodiments of the presentinvention is that a representation indicating a response of an enemyobject (enemy object 102, in the present embodiment) made when the swordobject 104 has collided with the enemy object can be easily switched inaccordance with the swing direction of the first controller 7 (the swingdirection of the sword object 104). Hereinafter, a configuration of thegame apparatus 3 and game processing executed by the game apparatus 3that are for switching a representation indicating a response of theenemy object 102 in accordance with the swing direction of the firstcontroller 7 will be described in detail.

[Main Data]

Hereinafter, with reference to FIG. 12, data to be stored in theexternal main memory 12 upon the game processing will be described.Here, FIG. 12 is a diagram showing an example of a memory map of theexternal main memory 12. As shown in FIG. 12, the external main memory12 includes a program storage area 121 and a data storage area 126. Theprogram storage area 121 stores a game program that is executed by theCPU 10. The data storage area 126 stores various data needed for thegame processing. Data stored in advance in the optical disc 4 is loadedas the program in the program storage area 121 and a part of data in thedata storage area 126, upon the game processing.

The program storage area 121 stores a main processing program 122, aready processing program 123, an attack start processing program 124, acollision determination processing program 125, and the like. The mainprocessing program 122 is a program for causing the CPU 10 to executemain processing shown in FIG. 13 described later. The ready processingprogram 123 is a program for causing the CPU 10 to execute readyprocessing shown in FIG. 15 described later. The attack start processingprogram 124 is a program for causing the CPU 10 to execute attack startprocessing shown in FIG. 16 described later. The collision determinationprocessing program 125 is a program for causing the CPU 10 to executecollision determination processing shown in FIG. 17 and FIG. 18described later.

The data storage area 126 stores controller data 127, estimatedorientation data 128, sword orientation data 129, sword position data130, swing direction data 131, attack flag 132, position relation data133, movement trajectory data 134, directionality data 135, priorityrank data 136, sword swing animation data 137, animation setting data138, object data 139, and the like.

The controller data 127 is controller data which has been transmittedfrom the first controller 7 to the game apparatus 3. As described above,the controller data is transmitted from the first controller 7 to thegame apparatus 3 at a rate of once every 1/200 second. Therefore, thecontroller data 127 stored in the external main memory 12 is updated atthis rate. In the present embodiment, in the data storage area 126, anold piece of controller data is rewritten to the latest piece ofcontroller data, whereby the old piece of controller data is discarded.However, in the case where a correction of data, or the like isperformed by using the old controller data, the past several pieces ofcontroller data may be stored, for example.

The controller data 127 includes angular velocity data 1271,acceleration data 1272, marker coordinate data 1273, and operation data1274. The angular velocity data 1271 is data indicating angularvelocities of the first controller 7 around the three axes of theX-axis, the Y-axis, and the Z-axis shown in FIG. 7 detected by the gyrosensor unit 9 (see FIG. 6). The acceleration data 1272 includes dataindicating accelerations of the first controller 7 in the three axes ofthe X-axis, the Y-axis, and the Z-axis shown in FIG. 2 detected by theacceleration sensor 701 (see FIG. 6), and data indicating accelerationsof the second controller 8 in the three axes of the x-axis, the y-axis,and the z-axis shown in FIG. 4 detected by the acceleration sensor 85(see FIG. 6).

The marker coordinate data 1273 is data indicating marker coordinatescalculated by the image processing circuit 744 of the imaginginformation calculation section 74. The marker coordinates arerepresented in a two-dimensional coordinate system for representing aposition on a plane corresponding to a shot image. It is noted that inthe case where both the markers 6R and 6L are shot by the imaging device743, two sets of marker coordinates are calculated. On the other hand,in the case where only one of the markers 6R and 6L is present in arange that can be shot by the imaging device 743, only one marker isshot by the imaging device 743, and one set of marker coordinates arecalculated. In addition, in the case where none of the markers 6R and 6Lis present in a range that can be shot by the imaging device 743, nomarker is shot by the imaging device 743, and marker coordinates are notcalculated. Thus, the marker coordinate data 1273 can indicate two setsof marker coordinates or one set of marker coordinates, or can indicatethat marker coordinates do not exist.

The operation data 1274 includes data indicating input states of theoperation buttons 72 a to 72 i of the first controller 7, and dataindicating input states of the analog joystick 84 a, the C-button 84 b,and the Z-button 84 c of the second controller 8. The CPU 10 of the gameapparatus 3 performs processing for realizing a function indicated bythe operation data 1274.

The estimated orientation data 128 is data indicating the orientation ofthe first controller 7. The estimated orientation data 128 is updatedbased on the angular velocity data 1271, every time the controller datafrom the first controller 7 is received by the wireless controllermodule 19 and then the angular velocity data 1271 is updated.

The sword orientation data 129 is data indicating the orientation of thesword object 104. The sword position data 130 is data indicating theposition of the sword object 104 in the virtual game space. The swordorientation data 129 and the sword position data 130 are updated asappropriate based on the estimated orientation data 128 so that thesword orientation data 129 and the sword position data 130 will reflectthe orientation and the position of the first controller 7,respectively.

The swing direction data 131 is data indicating the direction in whichthe player has swung the first controller 7 (the direction in which thefirst controller 7 has moved). The swing direction data 131 iscalculated based on the angular velocity data 1271.

The attack flag 132 is data indicating whether or not an instruction ofstarting an attack action by the sword object 104 has been performed. Aswill be described later in detail, when the player performs a gameoperation of swinging the first controller 7, the CPU 10 determineswhether or not an angular velocity (angular velocity indicated by theangular velocity data 1271) of the first controller 7 is equal to ormore than a predetermined value. Then, if the CPU 10 has determined thatan angular velocity of the first controller 7 is equal to or more than apredetermined value, since it is considered that an instruction of anattack action by the sword object 104 has been performed, the CPU 10sets the attack flag 132 to ON. In addition, the attack flag 132 is setto OFF after a content of a sword swing animation indicating a scene inwhich the player object 101 swings the sword object 104 is set (i.e.,after processing of step S126 in FIG. 17 described later is performed).

The position relation data 133 is data indicating a position relationbetween the player object 101 and a non-player object such as an enemyobject when the attack flag 132 has been set to ON. The positionrelation data 133 includes not only information indicating a positionrelation between the coordinates of the center of gravity of the playerobject 101 and the coordinates of the center of gravity of an enemyobject, but also information indicating the orientation of the enemyobject 102 such as the stance of the enemy object and the direction inwhich the enemy object faces.

The movement trajectory data 134 is data indicating the trajectory of amovement of the sword object 104 during a sword swinging operation inwhich the player object 101 swings the sword object 104. The trajectoryof movement indicated by the movement trajectory data 134 is calculatedbased on the sword orientation data 129, the sword position data 130,and the swing direction data 131.

The directionality data 135 is data that is set for some enemy objects(enemy object 102, in the present embodiment). The directionality data135 indicates a hitting direction that is the direction in which thesword object 104 can hit at the enemy object 102.

When the player object 101 attacks the enemy object 102 with the swordobject 104, if the swing direction of the first controller 7 indicatedby the swing direction data 131 coincides with a hitting directionindicated by a piece of the directionality data 135 corresponding to theenemy object 102 to be attacked, hitting processing is performed for theenemy object 102. Here, the hitting processing is processing of causingthe sword object 104 to hit at the enemy object 102, and damaging theenemy object 102 at which the sword object 104 has hit.

On the other hand, if the swing direction of the first controller 7indicated by the swing direction data 131 does not coincide with thehitting direction, repelling processing is performed for the enemyobject 102 to be attacked. Here, the repelling processing is processingof causing the enemy object 102 to repel the sword object 104. When therepelling processing is performed, the enemy object 102 is not damagedeven if the sword object 104 has collided with the enemy object 102.

The priority rank data 136 is data that is set when a plurality of enemyobjects to be attacked are present on the trajectory of a movement ofthe sword object 104 indicated by the movement trajectory data 134. Thepriority rank data 136 indicates priority ranks of the plurality ofenemy objects present on the trajectory of a movement of the swordobject 104. In the present embodiment, the priority ranks are set forthe plurality of enemy objects such that the priority rank of an enemyobject that will first collide with the sword object 104 when the swordobject 104 is swung in the direction corresponding to the swingdirection indicated by the swing direction data 131 is the highest. Aswill be described later, processing of determining whether to performthe hitting processing or the repelling processing is performed for anenemy object whose priority rank indicated by the priority rank data 136is the highest is performed, and then an animation indicating a resultof the processing is displayed on a screen of the liquid crystaltelevision 2.

The sword swing animation data 137 is moving image data for displaying,on the screen, a scene in which the player object 101 swings the swordobject 104 by using a motion blur effect. In the present embodiment,three types of animation data, that is, hitting processing animationdata, repelling processing animation data, and missed swing processinganimation data are stored, as the sword swing animation data 137, in thedata storage area 126. Here, the hitting processing animation data isanimation data for displaying, on the screen, a scene in which the swordobject 104 hits at an enemy object. The repelling processing animationdata is animation data for displaying, on the screen, a scene in whichthe sword object 104 is repelled by an enemy object (for example, theenemy object 102). The missed swing processing animation data isanimation data for displaying, on the screen, a scene in which theplayer object 101 swings the sword object 104 and misses.

It is noted that a missed swing of the sword object 104 is an action ofthe player object 101 taking a full swing with a sword as in the casewhere the sword object 104 hits at an enemy object. Therefore, thehitting processing animation data may be used as the missed swingprocessing animation data. That is, animations indicating scenes inwhich the player object 101 swings a sword may be realized by two typesof animation data including the hitting processing animation data andthe repelling processing animation data. In addition, in the presentembodiment, a case where the repelling processing animation data is usedfor displaying, on the screen, a scene in which the sword object 104 isrepelled by the enemy object 102 will be described. However, the screendisplay for the repelling processing may be realized by continuouslyreproducing the hitting processing animation data and the repellingprocessing animation data.

The animation setting data 138 is data indicating a content of ananimation to be displayed on the screen of the liquid crystal television2 as a result of an attack action by the sword object 104. When anattack action by the sword object 104 has been performed, an animationcorresponding to setting information indicated by the animation settingdata 138 is reproduced. For example, if the animation setting data 138indicating the “hitting processing” is stored in the data storage area126, the hitting processing animation data of the sword swing animationdata 137 is reproduced. In addition, for example, if the animationsetting data 138 indicating the “repelling processing” is stored in thedata storage area 126, the repelling processing animation data of thesword swing animation data 137 is reproduced.

The object data 139 is data that relates to objects such as the playerobject 101 and the enemy object 102 used in the game processing. Theobject data 139 includes position coordinate data, modeling data,texture data (RGB value), and the like for objects.

It is noted that the data storage area 126 also stores sound data usedin the game processing, data that relates to control of a virtual camerafor displaying, on the screen, the virtual game space, and the like,though not shown. These types of data do not directly relate to thepresent invention. Therefore, the description thereof is omitted herein.

[Main Process]

Next, the game processing to be executed by the game apparatus 3 will bedescribed. When the game apparatus 3 is powered ON, the CPU 10 of thegame apparatus 3 executes a boot program stored in the ROM/RTC 13. As aresult, the units such as the external main memory 12 are initialized.Then, a game program stored in the optical disc 4 is loaded onto theexternal main memory 12, and the CPU 10 starts executing the gameprogram.

FIG. 13 is a flowchart showing an example of a main process to beexecuted by the game apparatus 3. First, the CPU 10 executes processingof initializing data to be used in subsequent processing (step S1).Specifically, the CPU 10 initializes various variables and flags in thedata storage area 126 of the external main memory 12 to be used insubsequent processing. Then, the CPU 10 places, in a virtual game space,the player object 101, and a non-player object such as the enemy object102 (step S2). Specifically, the CPU 10 stores, in the data storage area126, data indicating an initial position of the virtual camera andinitial places of objects at the beginning of the game.

Subsequently, a virtual game space is formed and a game image isdisplayed on the liquid crystal television 2. That is, the CPU 10 formsa 3-dimensional virtual game space, and places the objects in thevirtual game space in accordance with the data indicating initial placesof the objects. Then, the CPU 10 causes the GPU 11 b to generate a gameimage indicating the virtual game space as seen from the virtual camera.The game image is outputted to the liquid crystal television 2, andthereby the game image is displayed on the liquid crystal television 2.Hereinafter, the game progresses while a processing loop from step S3 tostep S16 is repeated every frame (every 1/60 second, in the presentembodiment).

After processing of step S2, the CPU 10 determines, based on informationstored in the data storage area 126, whether or not a sword swinganimation in which the player object 101 swings the sword object 104 isbeing reproduced (step S3). If the CPU 10 has determined that a swordswing animation is being reproduced (YES in step S3), the processproceeds to step S14 described later.

If the CPU 10 has determined that a sword swing animation is not beingreproduced (NO in step S3), the CPU 10 obtains controller data (stepS4). Specifically, the CPU 10 stores, as the controller data 127, thecontroller data from the first controller 7 received by the wirelesscontroller module 19, in the data storage area 126.

Next, the CPU 10 determines whether or not an instruction of moving theplayer object 101 has been performed (step S5). Specifically, the CPU 10determines whether or not the operation data 1274 which is stored in thedata storage area 126 as a part of the controller data 127 includesoperation data indicating that the analog joystick 84 a of the secondcontroller 8 has been operated.

If the CPU 10 has determined that an instruction of moving the playerobject 101 has been performed (YES in step S5), that is, if theoperation data 1274 includes operation data indicating that the analogjoystick 84 a has been operated, the CPU 10 moves the player object 101to a position corresponding to the operation data (step S6). The objectdata 139 is updated so as to indicate the latest position of the playerobject 101 through the processing of step S6. On the other hand, if theCPU 10 has determined that an instruction of moving the player object101 has not been performed (NO in step S5), that is, if the operationdata 1274 does not include operation data indicating that the analogjoystick 84 a has been operated, the process proceeds to step S7described later.

After the CPU 10 has performed processing of moving the player object101 in step S6, or if the CPU 10 has determined “NO” in step S5, the CPU10 determines whether or not the attack flag 132 is set at ON (step S7).

Here, a swing operation of the first controller 7 performed by theplayer will be described. As described above, the angular velocitiesindicated by the angular velocity data 1271 are angular velocities inthree directions, i.e., an angular velocity with respect to a roll anglearound the Z-axis, an angular velocity with respect to a pitch anglearound the X-axis, and an angular velocity with respect to a yaw anglearound the Y-axis, as shown in FIG. 7. If the player has swung the firstcontroller 7 from left to right (see FIG. 10), or if the player hasswung the first controller 7 from right to left (see FIG. 11), theangular velocity with respect to the yaw angle around the Y-axistemporarily increases in accordance with the swing operation of thefirst controller 7. In addition, as shown in FIG. 14, if the player hasswung down the first controller 7, the angular velocity with respect tothe pitch angle around the X-axis temporarily increases in accordancewith the swing operation of the first controller 7. Therefore, whetheror not the player has started a swing operation of the first controller7 in order to cause the player object 101 to perform an action ofswinging the sword object 104, can be determined based on the angularvelocity with respect to the yaw angle around the Y-axis and the angularvelocity with respect to the pitch angle around the X-axis.

If the CPU 10 has determined that the attack flag 132 is set at OFF (NOin step S7), the CPU 10 determines whether or not an angular velocity ofthe first controller 7 indicated by the angular velocity data 1271 isequal to or larger than a predetermined value (step S8). As describedabove, whether or not a swing operation of the first controller 7 hasbeen started can be determined based on the angular velocity withrespect to the yaw angle around the Y-axis or the angular velocity withrespect to the pitch angle around the X-axis. Therefore, in step S8, theCPU 10 which functions as start determination means determines whetheror not the angular velocity with respect to the yaw angle around theY-axis or the angular velocity with respect to the pitch angle aroundthe X-axis indicated by the angular velocity data 1271 is equal to orlarger than a predetermined value. In the present embodiment, if evenone of the angular velocity with respect to the yaw angle around theY-axis and the angular velocity with respect to the pitch angle aroundthe X-axis is equal to or larger than a predetermined value, the CPU 10determines “YES” in step S8, and the process proceeds to step S10described later. On the other hand, if both the angular velocity withrespect to the yaw angle around the Y-axis and the angular velocity withrespect to the pitch angle around the X-axis are smaller thanpredetermined values, the CPU 10 determines “NO” in step S8, and theprocess proceeds to step S9 described later.

In this manner, the CPU 10 determines whether or not a swing operationof the first controller 7 has been started, based on the angularvelocity data from the gyro sensor unit 9.

It is noted that a predetermined value used for determination of theangular velocity with respect to the yaw angle around the Y-axis, and apredetermined value used for determination of the angular velocity withrespect to the pitch angle around the X-axis may be the same value, ormay be different values. The predetermined values are set at valuesappropriate in accordance with a content of a game, or the like.

If the CPU 10 has determined that the angular velocities of the firstcontroller 7 indicated by the angular velocity data 1271 are smallerthan predetermined values (NO in step S8), since it is considered thatan instruction of causing the player object 101 to attack has not beenperformed, the CPU 10 executes ready processing of causing the playerobject 101 to be ready with the sword object 104 (step S9). The detailof the ready processing will be described later with reference to FIG.15.

If the CPU 10 has determined that an angular velocity of the firstcontroller 7 indicated by the angular velocity data 1271 is equal to orlarger than a predetermined value (YES in step S8), since it isconsidered that an instruction of causing the player object 101 toattack has been performed, the CPU 10 executes attack start processingof causing the player object 101 to start an action of swinging thesword object 104 (step S10). The detail of the attack start processingwill be described later with reference to FIG. 16.

On the other hand, if, in step S7, the CPU 10 has determined that theattack flag 132 is set at ON (YES in step S7), the CPU 10 executescollision determination processing of determining whether or not thesword object 104 has hit at an enemy object (for example, the enemyobject 102) (step S12). The detail of the collision determinationprocessing will be described later with reference to FIG. 17 and FIG.18. A sword swing animation of swinging the sword object 104 indicatinga result of the collision determination processing is set through thecollision determination processing. Therefore, after the CPU 10 hasperformed the collision determination processing in step S12, the CPU 10starts reproducing the sword swing animation that has been set (stepS13).

If the CPU 10 has determined “YES” in step S3, or after the CPU 10 hasexecuted the processing of step S9, step S10, or step S13, the CPU 10performs other processing (step S14). Specifically, the CPU 10 performsprocessing of, for example, moving a non-player object (for example, theenemy object 102), other than the player object 101 and the sword object104, appearing in the virtual game space. Then, the CPU 10 causes theGPU 11 b to generate a game image indicating a result of the processingfrom step S3 to step S14, and displays the generated game image on theliquid crystal television 2 (step S15).

After the processing of step S15, the CPU 10 determines whether or notan instruction of quitting the game has been performed, based on whetheror not the power button 24, the reset button 25, or the operation button72 h has been operated (step S16). If the CPU 10 has determined that aninstruction of quitting the game has not been performed (NO in stepS16), the process returns to step S3, the game processing from step S3is repeated. On the other hand, if the CPU 10 has determined that aninstruction of quitting the game has been performed (YES in step S16),the CPU 10 ends the series of steps of game processing.

[Ready Process]

FIG. 15 is a flowchart showing in detail the ready processing in step S9in FIG. 13. If, in step S8, the CPU 10 has determined that the angularvelocities of the first controller 7 are smaller than predeterminedvalues (NO in step S8), the CPU 10 calculates the orientation of thefirst controller 7, based on the angular velocity data 1271 (step S91).Specifically, the CPU 10 updates the orientation of the first controller7 indicated by the estimated orientation data 128, based on the angularvelocities indicated by the angular velocity data 1271, therebycalculating the current orientation of the first controller 7.

Subsequently, the CPU 10 calculates an orientation and a position of thesword object 104, based on the latest orientation of the firstcontroller 7 indicated by the estimated orientation data 128 (step S92).Specifically, based on the orientation of the first controller 7indicated by the estimated orientation data 128, the CPU 10 calculatesan orientation of the sword object 104 such that the sword object 104 isdirected in the same direction as the first controller 7. Then, the CPU10 calculates a position of the sword object 104 in the virtual gamespace, in consideration of the position of the player object 101, thelength of the arm of the player object 101, and the like which areindicated by the object data 139. The orientation and the position ofthe sword object 104 calculated in the processing of step S92 arestored, as the sword orientation data 129 and the sword position data130, respectively, in the data storage area 126.

The orientation of the first controller 7 is reflected in theorientation and the position of the sword object 104 through theprocessing of step S92. Then, the display processing of step S15 isperformed based on the sword orientation data 129, the sword positiondata 130, the object data 139, and the like, thereby displaying, on theliquid crystal television 2, a game image indicating a state in whichthe player object 101 is ready with the sword object 104 similarly tothe posture of the player being ready with the first controller 7.

[Attack Start Processing]

FIG. 16 is a flowchart showing in detail the attack start processing instep S10 in FIG. 13. If the CPU 10 has determined that an angularvelocity of the first controller 7 is equal to or larger than apredetermined value in step S8 (YES in step S8), the CPU 10 changes theorientation of the sword object 104 in the virtual game space (stepS101). Specifically, the CPU 10 updates the sword orientation data 129,based on the angular velocities around 3 axes indicated by the angularvelocity data 1271.

After the processing of step S101 is performed, the display processingof step S15 is performed, thereby displaying, on the liquid crystaltelevision 2, a game image indicating a state in which the player object101 swings the sword object 104 such that the orientation of the swordobject 104 is the same as that of the first controller 7 at the timewhen the player starts an operation of swinging the first controller 7.

Subsequently to the processing of step S101, the CPU 10 which functionsas direction determination means determines the swing direction of thefirst controller 7 (step S102). Specifically, the CPU 10 determines theswing direction (operation direction) of the first controller 7, basedon the angular velocity with respect to the yaw angle around the Y-axisand the angular velocity with respect to the pitch angle around theX-axis indicated by the angular velocity data 1271. In the presentembodiment, the swing direction of the first controller 7 is determinedto be one of four directions of down direction, up direction, rightdirection, or left direction. The swing direction determined in stepS102 is stored, as the swing direction data 131, in the data storagearea 126.

Here, the down direction is the operation direction of the firstcontroller 7 in the case where the player has performed an operation ofswinging the first controller 7 from up to down (see FIG. 14). The updirection is the operation direction of the first controller 7 in thecase where the player has performed an operation of swinging the firstcontroller 7 from down to up. The right direction is the operationdirection of the first controller 7 in the case where the player hasperformed an operation of swinging the first controller 7 from left toright (see FIG. 10). The left direction is the operation direction ofthe first controller 7 in the case where the player has performed anoperation of swinging the first controller 7 from right to left (seeFIG. 11).

It is noted that in the present embodiment, a case where the swingdirection of the first controller 7 is determined to be one of the abovefour directions will be described. However, the swing direction to bedetermined is not limited to four directions. For example, the swingdirection of the first controller 7 may be determined to be one of eightdirections including a lower-right oblique direction, a lower-leftoblique direction, an upper-right oblique direction, and an upper-leftoblique direction in addition to the above four directions.

Here, the processing of determining the swing direction in step S102 isexecuted subsequently to the processing of step S8 in the case where theCPU 10 has determined that an angular velocity of the first controller 7is equal to or larger than a predetermined value in step S8. That is, inthe present embodiment, the processing of determining the swingdirection of the first controller 7 is performed when the CPU 10 hasdetermined that an operation of swinging the first controller 7 has beenstarted.

After the CPU 10 has determined the swing direction of the firstcontroller 7, the CPU 10 sets the attack flag 132 to ON (step S103). Bythe attack flag 132 being set to ON, the CPU 10 determines “YES” in stepS7, and the process proceeds to collision determination processingdescribed below.

[Collision Determination Processing]

FIG. 17 and FIG. 18 are flowcharts showing in detail the collisiondetermination processing in step S12 in FIG. 13. If the CPU 10 hasdetermined that the attack flag 132 is set at ON in step S7 (YES in stepS7), the CPU 10 which functions as position relation detection meansdetects a position relation between the sword object 104 and an enemyobject by referring to the sword position data 130 and the object data139 stored in the data storage area 126 (step S121). A result of thedetection in the processing of step S121 is stored, as the positionrelation data 133, in the data storage area 126.

Subsequently to the processing of step S121, the CPU 10 calculates atrajectory of a movement of the sword object 104, based on the swordorientation data 129, the sword position data 130, and the swingdirection data 131 (step S122). That is, the CPU 10 calculates whattrajectory the sword object 104 that is in the orientation indicated bythe sword orientation data 129 and at the position indicated by swordposition data 130 will move on when the sword object 104 is swung in thedirection corresponding to the swing direction indicated by the swingdirection data 131. Then, the CPU 10 which functions as collisiondetermination means determines whether or not the sword object 104 willcollide with an enemy object that is a determination target (step S123).Specifically, the CPU 10 determines whether or not the sword object 104will collide with the enemy object (for example, the enemy object 102),by referring to the position relation data 133 obtained in theprocessing of step S121, based on whether or not the enemy object ispresent on the trajectory of the movement calculated in the processingof step S122.

After the CPU 10 has performed the collision determination in step S123,the CPU 10 determines, based on a result of the collision determination,whether or not a determination target (hereinafter, referred to as a“collision target”) that the sword object 104 will collide with ispresent (step S124). If the CPU 10 has determined that a collisiontarget is not present (NO in step S124), the CPU 10 performs the missedswing processing of swinging the sword object 104 so as to miss (stepS125).

After the CPU 10 has performed the missed swing processing in step S125,the CPU 10 sets a sword swing animation (step S126). Specifically, theCPU 10 stores the animation setting data 138 indicating the missed swingprocessing in the data storage area 126. Then, the CPU 10 sets theattack flag 132 which has been set to ON in the processing of step S103,to OFF (step S127).

After the CPU 10 has performed the processing of step S127, the processproceeds to step S13. That is, the CPU 10 starts reproducing a swordswing animation corresponding to the content set in the processing ofstep S126 (step S13). Here, the animation setting data 138 indicatingthe “missed swing processing” is stored in the data storage area 126 bythe CPU 10 performing the processing of step S125 and then theprocessing of step S126. Therefore, the CPU 10 selects the missed swingprocessing animation data from among the sword swing animation data 137,and starts reproducing the selected data. If the CPU 10 startsreproducing the missed swing processing animation data in this manner,the CPU 10 continues to determine “YES” in step S3 and thereby repeatsthe display processing of step S15, until the reproduction of the missedswing processing animation data is finished. As a result, a scene inwhich the player object 101 swings the sword object 104 and misses isdisplayed on the liquid crystal television 2.

On the other hand, if the CPU 10 has determined that a collision targetthat the sword object 104 will collide with is present (YES in stepS124), the CPU 10 determines whether or not a plurality of collisiontargets are present (step S129). If the CPU 10 has determined that aplurality of collision targets are present (YES in step S129), theprocess proceeds to step S136 (see FIG. 18) described later.

If the CPU 10 has determined that one collision target is present (NO instep S129), the CPU 10 determines whether or not the collision targethas a directionality (step S130). Specifically, the CPU 10 determineswhether or not a piece of the directionality data 135 corresponding tothe collision target is stored in the data storage area 126. If a pieceof the directionality data 135 corresponding to the collision target isstored in the data storage area 126, the CPU 10 can determine that thecollision target has a directionality. On the other hand, if a piece ofthe directionality data 135 corresponding to the collision target is notstored in the data storage area 126, the CPU 10 can determine that thecollision target does not have a directionality.

FIG. 19 is a screen view showing an example of an animation displayed onthe liquid crystal television 2 in the case where the player has swungthe first controller 7 from left to right. No piece of directionalitydata 135 is set for an enemy object 106 shown in FIG. 19. In the casewhere the sword object 104 collides with a collision target such as theenemy object 106 that does not have a directionality, the hittingprocessing is performed for the collision target, irrespective of theswing direction of the first controller 7.

If the CPU 10 has determined that the collision target does not have adirectionality (NO in step S130), the CPU 10 which functions ascollision processing determination means performs the hitting processingfor the collision target (step S131). Specifically, the CPU 10 executesprocessing of causing the sword object 104 to hit at the collisiontarget (in this case, the enemy object 106), and damaging the collisiontarget that the sword object 104 has hit at.

Also in the case where the processing of step S131 has been performed,the above-described processing from the step S126 is performed. In thecase where the processing of step S126 is to be performed subsequentlyto the processing of step S131, the CPU 10 stores the animation settingdata 138 indicating the “hitting processing” in the data storage area126 in the processing of step S126. In this case, in step S13, the CPU10 selects the hitting processing animation data from among the swordswing animation data 137, and starts reproducing the selected data. Ifthe CPU 10 starts reproducing the hitting processing animation data inthis manner, the CPU 10 continues to determine “YES” in step S3 andthereby repeats the display processing of step S15, until thereproduction of the hitting processing animation data is finished. As aresult, a scene in which the sword object 104 hits at the collisiontarget and the collision target is damaged is displayed on the liquidcrystal television 2. FIG. 19 shows a game image displayed on the liquidcrystal television 2 in the case where, in step S131, the hittingprocessing is performed for the enemy object 106 which is the collisiontarget. It is noted that since the enemy object 106 does not have adirectionality, the hitting processing is performed for the enemy object106, no matter what direction the sword object 104 has been swung in forthe enemy object 106 (no matter what direction the first controller 7has been swung in).

On the other hand, if the CPU 10 has determined that the collisiontarget has a directionality (YES in step S130), the CPU 10 determineswhether or not, in the position relation detected in the processing ofstep S121, the swing direction of the first controller 7 determined inthe processing of step S102 (see FIG. 16) coincides with a hittingdirection indicated by the piece of the directionality data 135 set forthe collision target that the sword object 104 will collide with (stepS132). If the CPU 10 has determined that the swing direction of thefirst controller 7 coincides with the hitting direction (YES in stepS132), the process proceeds to step S131. That is, the hittingprocessing is performed for the collision target having a directionality(for example, the enemy object 102). In this manner, if the CPU 10 hasdetermined, for the collision target having a directionality, that theswing direction coincides with the hitting direction, for example, ananimation shown in FIG. 10 is displayed on the liquid crystal television2.

If the CPU 10 has determined that the swing direction of the firstcontroller 7 does not coincide with the hitting direction (NO in stepS132), the CPU 10 performs the repelling processing for the collisiontarget (step S133). Specifically, the CPU 10 causes the collision targethaving a directionality (for example, the enemy object 102) to repel thesword object 104.

Also in the case where the processing of step S133 has been performed,the above-described processing from the step S126 is performed. In thecase where the processing of step S126 is to be performed subsequentlyto the processing of step S133, the CPU 10 stores the animation settingdata 138 indicating the “repelling processing” in the data storage area126 in the processing of step S126. In this case, in step S13, the CPU10 selects the repelling processing animation data from among the swordswing animation data 137, and starts reproducing the selected data. Ifthe CPU 10 starts reproducing the repelling processing animation data inthis manner, the CPU 10 continues to determine “YES” in step S3 andthereby repeats the display processing of step S15, until thereproduction of the repelling processing animation data is finished. Asa result, a scene in which the sword object 104 is repelled by thecollision target having a directionality (for example, the enemy object102) is displayed on the liquid crystal television 2 (see FIG. 11).

As described above, the CPU 10 executes the processing from step S130 tostep S133, thereby determining, based on the swing direction of thefirst controller 7 determined in the processing of step S102, whether ornot to perform the hitting processing for the collision target that thesword object 104 will collide with (in the present embodiment, whetherto perform the hitting processing or the repelling processing).

For example, for the enemy object 102 having a directionality (see FIG.10 and FIG. 11), a piece of the directionality data 135 indicating theright direction as the hitting direction is stored in the data storagearea 126. Therefore, if the swing direction of the first controller 7determined in the processing of step S102 is the right direction, theswing direction coincides with the hitting direction. Therefore, thehitting processing is performed for the enemy object 102, and ananimation indicating the corresponding scene is displayed on the liquidcrystal television 2 (see FIG. 10). On the other hand, if the swingdirection of the first controller 7 determined in the processing of stepS102 is the left direction, the swing direction does not coincide withthe hitting direction. Therefore, the repelling processing is performedfor the enemy object 102, and an animation indicating the correspondingscene is displayed on the liquid crystal television 2 (see FIG. 11).

It is noted that the determination processing in step S132 is performedin consideration of the position relation between the sword object 104and the non-player object detected in the processing of step S121. Forexample, the hitting direction indicated by the piece of thedirectionality data 135 corresponding to the enemy object 102 isdifferent between a state in which the enemy object 102 faces the playerobject 101 (see FIG. 10 and FIG. 11) and a state in which the enemyobject 102 has its back to the player object 101 (not shown). That is,when the enemy object 102 faces the player object 101, the hittingdirection of the enemy object 102 is the right direction, but when theenemy object 102 has its back to the player object 101, the hittingdirection of the enemy object 102 is the left direction. Thus, thehitting direction indicated by the directionality data 135 changesdepending on the position relation between the sword object 104 (playerobject 101) and the non-player object. Therefore, by considering theposition relation between the sword object 104 and the non-player objectto determine whether or not to perform the hitting processing, thedetermination can be accurately performed.

In addition, for example, also in the case where the hitting directionof the enemy object 102 changes by the enemy object 102 turning theshield upward, or in the case where an object that is an obstacle ispresent between the sword object 104 and the enemy object 102, it iseffective to consider the position relation between the sword object 104and the non-player object to determine whether or not to perform thehitting processing.

If the CPU 10 has determined that a plurality of collision targets arepresent in step S129 (YES in step S129), the CPU 10 which functions aspriority rank setting means sets priority ranks for the plurality ofcollision targets, based on the position relation between objectsdetected in the processing of step S121, and the swing direction of thefirst controller 7 determined in the processing of step S102 (stepS136). Specifically, the CPU 10 sets priority ranks for the plurality ofcollision targets such that, in the position relation between objectsdetected in step S121, when the first controller 7 is swung in the swingdirection determined in step S102, the priority rank of the collisiontarget that the sword object 104 will first collide with is the highest.

For example, in the state where the enemy object 102 and the enemyobject 106 that are collision targets are present side by side as shownin FIG. 20, when the first controller 7 has been swung from right toleft, the collision target that the sword object 104 will first collidewith is the enemy object 106. Therefore, the CPU 10 sets priority ranksfor the enemy object 102 and the enemy object 106 such that the priorityrank of the enemy object 106 is higher than the priority rank of theenemy object 102.

In addition, for example, in the state where the enemy object 106 andthe enemy object 102 that are collision targets are present side by sideas shown in FIG. 21, when the first controller 7 has been swung fromright to left, the collision target that the sword object 104 will firstcollide with is the enemy object 102. Therefore, the CPU 10 setspriority ranks for the enemy object 102 and the enemy object 106 suchthat the priority rank of the enemy object 102 is higher than thepriority rank of the enemy object 106.

In this manner, if the CPU 10 has determined that the sword object 104will collide with a plurality of collision targets, the CPU 10 setspriority ranks for the plurality of collision targets, based on theswing direction of the first controller 7, and the position relationbetween the sword object 104 and the non-player objects. The priorityranks set in the processing of step S136 are stored as the priority rankdata 136 in the data storage area 126.

Subsequently to the processing of step S136, the CPU 10 determineswhether or not the collision target having the highest priority rank hasa directionality (step S137). Specifically, the CPU 10 specifies thecollision target having the highest priority rank from among theplurality of collision targets that the sword object 7 might collidewith, by referring to the priority rank data 136 stored in the datastorage area 126. Then, the CPU 10 determines whether or not thespecified collision target has a directionality, based on whether or nota piece of the directionality data 135 corresponding to the specifiedcollision target is stored in the data storage area 126.

If the CPU 10 determines that the collision target having the highestpriority rank does not have a directionality (NO in step S137), the CPU10 performs the hitting processing for the collision target having thehighest priority rank (step S138). The hitting processing in step S138is performed in the same manner as in the hitting processing performedin step S131 after the CPU 10 has determined “NO” in step S130. Afterthe processing of step S138 has been performed, the process proceeds tostep S126 (see FIG. 17). In the present embodiment, an example ofcollision targets having no directionality is the enemy object 106. Ifthe enemy object 106 is set so as to be a collision target having thehighest priority rank and then the hitting processing is performed, ahitting processing animation indicating a scene in which the swordobject 104 hits at the enemy object 106 is reproduced as shown in FIG.20.

If the CPU 10 has determined that the collision target having thehighest priority rank has a directionality (YES in step S137), the CPU10 determines whether or not the swing direction of the first controller7 coincides with the hitting direction set for the collision targethaving the highest priority rank (step S139). Specifically, the CPU 10determines the hitting direction set, in advance, for the collisiontarget having the highest priority rank, by referring to the piece ofthe directionality data 135 corresponding to the collision target havingthe highest priority rank. Then, the CPU 10 determines whether or notthe swing direction (swing direction indicated by the swing directiondata 131) determined in the processing of step S102 coincides with thehitting direction of the collision target having the highest priorityrank.

If the CPU 10 has determined that the swing direction coincides with thehitting direction (YES in step S139), the CPU 10 performs the hittingprocessing of step S138 for the collision target having the highestpriority rank. In the present embodiment, an example of collisiontargets having a directionality is the enemy object 102. If the enemyobject 102 is set so as to be a collision target having the highestpriority rank and then the hitting processing is performed, a hittingprocessing animation indicating a scene in which the sword object 104hits at the enemy object 102 is reproduced as shown in FIG. 22.

On the other hand, if the CPU 10 has determined that the swing directiondoes not coincide with the hitting direction (NO in step S139), the CPU10 performs the repelling processing for the collision target having thehighest priority rank (step S140). The repelling processing in step S140is performed in the same manner as in the repelling processing performedin step S133. After the processing of step S140 has been performed, theprocess proceeds to step S126 (see FIG. 17). For example, if the enemyobject 102 is set so as to be a collision target having the highestpriority rank and then the repelling processing is performed, arepelling processing animation indicating a scene in which the swordobject 104 is repelled by the enemy object 102 is reproduced as shown inFIG. 21.

As described above, in the case where priority ranks are set for aplurality of collision targets, the CPU 10 determines whether to performthe hitting processing or the repelling processing for the collisiontarget having the highest priority rank.

Functional Effects of the Present Embodiment

As described above, in the present embodiment, if the CPU 10 hasdetermined that the sword object 104 will collide with the enemy object,the CPU 10 determines whether or not to perform the hitting processingfor the enemy object, based on the swing direction of the firstcontroller 7. That is, when the sword object 104 has collided with anenemy object, the CPU 10 does not unconditionally perform the hittingprocessing, but determines whether or not to perform the hittingprocessing, based on the swing direction of the first controller 7.Therefore, a representation indicating a response of the enemy objectupon collision can be easily switched in accordance with the swingdirection of the first controller 7 (that is, the direction in which thesword object 104 collides with the enemy object).

In addition, in the present embodiment, whether or not to perform thehitting processing for an enemy object is determined in consideration ofnot only the swing direction of the first controller 7 but also theposition relation between the sword object 104 and the enemy object.Therefore, even if the position relation (for example, the direction andthe posture of the enemy object 102) between the sword object 104 and anenemy object that will be attacked by the sword object 104 has changed,whether or not to perform the hitting processing for the enemy objectcan be appropriately determined.

In addition, in the present embodiment, in the case where the swordobject 104 might collide with a plurality of enemy objects, priorityranks are set for the plurality of enemy objects, and whether or not toperform the hitting processing is determined for an enemy object havingthe highest priority rank. Therefore, whether or not to perform thehitting processing can be appropriately determined for an enemy objectfor which whether or not to perform the hitting processing should bedetermined.

In addition, in the present embodiment, the swing direction of the firstcontroller 7 is determined at a timing when it has been determined thatan operation of swinging the first controller 7 so as to perform aninstruction of attacking with the sword object 104 has been started. Inother words, the swing direction of the first controller 7 is determinedbefore the sword object 104 collides with an enemy object. Therefore,whether or not to perform the hitting processing for an enemy object canbe determined at an easier timing than in the case where the swingdirection of the first controller 7 is determined when the sword object104 has collided with an enemy object. As a result, it becomes possibleto reduce a time lag from when an operation of swinging the firstcontroller 7 is started, to when a reproduction of a sword swinganimation is started.

In addition, in the present embodiment, the determination processing ofdetermining the swing direction of the first controller 7, and thecollision determination of whether or not the sword object 104 willcollide with an enemy object, are performed based on angular velocitydata outputted from the gyro sensor unit 9. Therefore, the abovedetermination processing and collision processing can be performed moreaccurately than, for example, in the case where angular velocity dataoutputted from the acceleration sensor 701 is used.

[Modification of Collision Determination Processing]

In the above embodiment, a case where if the sword object 104 mightcollide with a plurality of collision targets, whether or not to performthe hitting processing is determined only for a collision target havingthe highest priority rank, is described. In addition to this, if it hasbeen determined that the hitting processing is to be performed for thecollision target having the highest priority rank, whether or not toperform the hitting processing may further be determined for a collisiontarget having the next highest priority rank.

Hereinafter, with reference to FIG. 23, a modification of the collisiondetermination processing will be described. Here, FIG. 23 is a flowchartshowing the modification of the collision determination processing. Inthe present modification, if, in step S129 (see FIG. 17), the CPU 10 hasdetermined that a plurality of collision targets are present (YES instep S129), the CPU 10 performs processing from step S151 describedbelow, instead of the processing from step S136 to step S140 in FIG. 18.

If the CPU 10 has determined that a plurality of collision targets arepresent (YES in step S129), the CPU 10 sets priority ranks for theplurality of determination targets, based on the position relationbetween objects, and the swing direction of the first controller 7 (stepS151), as in the processing of step S136.

Then, the CPU 10 determines whether or not the collision target havingthe highest priority rank has a directionality (step S152), as in theprocessing of step S137. If the CPU 10 has determined that the collisiontarget having the highest priority rank has a directionality (YES instep S152), the CPU 10 determines whether or not the swing direction ofthe first controller 7 coincides with the hitting direction set, inadvance, for the collision target having the highest priority rank (stepS153), as in the processing of step S139. Here, if the CPU 10 hasdetermined that the swing direction does not coincide with the hittingdirection (NO in step S153), the CPU 10 performs the repellingprocessing for the collision target having the highest priority rank(step S154), as in the processing of step S140. After the processing ofstep S154 has been performed, the process proceeds to step S126. In thiscase, a repelling processing animation indicating a scene in which thesword object 104 is repelled by the enemy object 102 which is thecollision target having the highest priority rank is reproduced as shownin FIG. 21.

On the other hand, if the CPU 10 has determined that the collisiontarget having the highest priority rank does not have a directionality(NO in step S152), or if the CPU 10 has determined that the swingdirection coincides with the hitting direction (YES in step S153), theCPU 10 performs the hitting processing for the collision target havingthe highest priority rank (step S155), as in the processing of stepS138.

In the case where the hitting processing is to be performed for thecollision target having the highest priority rank, the sword object 104that has cut the collision target having the highest priority rank is tocollide with the collision target having the next highest priority rank.Accordingly, in the present modification, after the CPU 10 has performedthe processing of step S155, the CPU 10 performs processing from stepS156 described below, for a collision target having a lower priorityrank than the collision target having the highest priority rank.

After the CPU 10 has performed the processing of step S155, the CPU 10determines whether or not the collision target having the next highestpriority rank has a directionality (step S156). Specifically, the CPU 10determines whether or not a piece of the directionality data 135corresponding to an enemy object that is the collision target having thenext highest priority rank is stored in the data storage area 126.

If the CPU 10 has determined that the collision target having the nexthighest priority rank has a directionality (YES in step S156), the CPU10 determines whether or not the swing direction of the first controller7 coincides with the hitting direction set, in advance, for thecollision target having the next highest priority rank (step S157).Specifically, by referring to the piece of the directionality data 135corresponding to the collision target having the next highest priorityrank which is the determination target in the processing of step S156,the CPU 10 specifies the hitting direction of the collision targethaving the next highest priority rank. Then, the CPU 10 determineswhether or not the swing direction indicated by the swing direction data131 coincides with the specified hitting direction of the collisiontarget having the next highest priority rank.

If the CPU 10 has determined that the swing direction of the firstcontroller 7 does not coincide with the hitting direction of thecollision target having the next highest priority rank (NO in stepS157), the CPU 10 performs the repelling processing for the collisiontarget having the next highest priority rank (step S158). The repellingprocessing in step S158 is performed in the same manner as in theprocessing of step S140, except that the repelling processing isperformed not for the collision target having the highest priority rankbut for the collision target having the next highest priority rank.

After the CPU 10 has performed the processing of step S158, the processproceeds to step S126. In this case, the hitting processing is performedfor the collision target having the highest priority rank, and therepelling processing is performed for the collision target having thenext highest priority rank. Therefore, an animation as shown in FIG. 24is reproduced. Here, FIG. 24 is a screen view showing an example of ananimation displayed on the liquid crystal television 2 in the case wherethe enemy object 106 is set to be the collision target having thehighest priority rank, the enemy object 102 adjacent to the enemy object106 is set to be the collision target having the next highest priorityrank, and the swing direction of the first controller 7 does notcoincide with the hitting direction of the enemy object 102. FIG. 24shows a scene in which the hitting processing is performed for the enemyobject 106, and the repelling processing is performed for the enemyobject 102 adjacent to the enemy object 106.

If the CPU 10 has determined that the collision target having the nexthighest priority rank does not have a directionality (NO in step S156),or if the CPU 10 has determined that the swing direction coincides withthe hitting direction (YES in step S157), the CPU 10 performs thehitting processing for the collision target having the next highestpriority rank (step S159). The hitting processing in step S159 isperformed in the same manner as in the processing of step S138, exceptthat the hitting processing is performed not for the collision targethaving the highest priority rank but for the collision target having thenext highest priority rank.

After the CPU 10 has performed the processing of step S159, the CPU 10determines whether or not a collision target for which whether toperform the hitting processing or the repelling processing is yet to bedetermined is present (step S160). If the CPU 10 has determined that acollision target for which whether to perform the hitting processing orthe repelling processing is yet to be performed is present (YES in stepS160), the process returns to step S156. That is, if the plurality ofcollision targets include a collision target other than the collisiontarget for which the hitting processing has been performed in theprocessing of step S155 and the collision target for which the hittingprocessing has been performed in the processing of step S159, theprocess returns to step S156.

If the CPU 10 has determined that a collision target for which whetherto perform the hitting processing or the repelling processing is yet tobe performed is not present (NO in step S160), the process proceeds tostep S126. In this case, the hitting processing is performed for thecollision target having the highest priority rank and the collisiontarget having the next highest priority rank. Therefore, an animation asshown in FIG. 25 is reproduced. Here, FIG. 25 is a screen view showingan example of an animation displayed on the liquid crystal television 2in the case where the enemy object 106 on the left side is set to be thecollision target having the highest priority rank, another enemy object106 adjacent to the enemy object 106 on the left side is set to be thecollision target having the next highest priority rank, and the enemyobject 102 adjacent to the other enemy object 106 is set to be thecollision target having the lowest priority rank. Here, the two enemyobjects 106 do not have directionalities, and the swing direction of thefirst controller 7 coincides with the hitting direction of the enemyobject 102. Therefore, as shown in FIG. 25, a scene in which the swordobject 104 is fully swung and the hitting processing is performed forthe two enemy objects 106 and the enemy object 102 is displayed.

On the other hand, in the case where, after the CPU 10 has determined“YES” in the processing of step S160 and the process returns to stepS156, the repelling processing of step S158 is performed for thecollision target having the lowest priority rank, an animation as shownin FIG. 26 is reproduced. Here, FIG. 26 is a screen view showing anexample of an animation displayed on the liquid crystal television 2 inthe case where the enemy object 106 on the right side is set to be thecollision target having the highest priority rank, another enemy object106 adjacent to the enemy object 106 on the right side is set to be thecollision target having the next highest priority rank, and the enemyobject 102 adjacent to the other enemy object 106 is set to be thecollision target having the lowest priority rank. Here, the two enemyobjects 106 do not have directionalities, and the swing direction of thefirst controller 7 does not coincide with the hitting direction of theenemy object 102. Therefore, as shown in FIG. 26, a scene in which thesword object 104 hits at the two enemy objects 106 and then is repelledby the enemy object 102 is displayed.

It is noted that the modification of the collision determinationprocessing described above can be realized by preparing, for example,five pieces of animation data of: animation data for displaying a scenein which the sword object 104 is fully swung; animation data fordisplaying a scene in which the sword object 104 starts a swing actionand stops at the first collision target; animation data for displaying ascene in which the sword object 104 starts a swing action and stops atthe second collision target; animation data for displaying a scene inwhich the sword object 104 starts a swing action and stops at the thirdcollision target; and animation data for displaying a scene in which thesword object 104 is repelled.

[Other Modifications]

The present invention is not limited to the above embodiment, and may berealized as the following modes, for example. That is, although theabove embodiment describes the case where whether or not to perform thehitting processing for a collision target is determined in considerationof a position relation between the sword object 104 and a non-playerobject, whether or not to perform the hitting processing for a collisiontarget may be determined only based on the swing direction of the firstcontroller 7, without consideration of a position relation betweenobjects.

In addition, the above embodiment describes the case where, if the swordobject 104 might collide with a plurality of collision targets, priorityranks are set for the plurality of collision targets, and whether or notto perform the hitting processing is determined only for the collisiontarget having the highest priority rank. In addition, the abovemodification describes the case where, after priority ranks have beenset for a plurality of collision targets, if it has been determined thatthe hitting processing is to be performed for a certain collisiontarget, whether or not to perform the hitting processing is determinedfor a collision target having the highest priority rank next to thecertain collision target. Instead of the above cases, whether or not toperform the hitting processing may be determined for all of theplurality of collision targets without setting priority ranks for them.

In addition, the above embodiment describes the case where, when anoperation of swinging the first controller 7 is started (when an angularvelocity indicated by the angular velocity data 1271 has become equal toor larger than a predetermined value), the swing direction of the firstcontroller 7 is determined. Instead, the swing direction of the firstcontroller 7 may be determined at a timing when it has been determinedthat the sword object 104 has collided with an enemy object that is acollision target. Specifically, the processing of step S102 in FIG. 16may be performed at the time when the CPU 10 has determined “YES” instep S124 (see FIG. 17), for example.

In addition, the above embodiment describes the case where, when anoperation of swinging the first controller 7 is started (when an angularvelocity indicated by the angular velocity data 1271 has become equal toor larger than a predetermined value), a trajectory of a movement of thesword object 104 is calculated and then a collision with an enemy objectis determined. Instead, the angular velocity data may be obtained everyframe even after an operation of swinging the first controller 7 hasbeen started, and the movement (action) of the sword object 104 may becontrolled in real time, based on the obtained angular velocity data. Inthis case, collision is determined based on the position of an enemyobject, and the orientation and the position of the sword object 104calculated based on the obtained angular velocity data.

In addition, the above embodiment describes the case where priorityranks are set after it has been determined that a plurality of collisionobjects are present. However, priority ranks may be set before thecollision determination in step S123 (see FIG. 17).

In addition, data indicating the size of a determination area forcollision determination may be used as another example of thedirectionality data 135. Specifically, the swing direction of the firstcontroller 7 is determined when the ready processing (see FIG. 15) isperformed, or at any timing before the collision determination in stepS123, and the size of the determination area for collision determinationset for an enemy object that is a collision target is changed inaccordance with the determined swing direction. For example, when theplayer has swung the first controller 7 from right to left, the size ofthe determination area of a collision target is relatively increased,and on the other hand, when the player has swung the first controller 7from left to right, the size of the determination area of a collisiontarget is relatively decreased. As a result, when the player has swungthe first controller 7 from right to left, a collision is likely tooccur because the size of the determination area of a collision targetis relatively large, and on the other hand, when the player has swungthe first controller 7 from left to right, a collision is not likely tooccur because the size of the determination area of a collision targetis relatively small, thereby obtaining the same effect as in the case ofusing data indicating the direction in which a target can be hit.

In addition, the above embodiment uses the 2-axis gyro sensor 96 and the1-axis gyro sensor 97 for detecting angular velocities around 3 axes.However, any number of gyro sensors may be used, and any combination oftheir types may be adopted, as long as they can detect angularvelocities around 3 axes.

In addition, in the above embodiment, the 3 axes around which the gyrosensors 96 and 97 detect angular velocities are set so as to coincidewith the 3 axes (X, Y, and Z axes) around which the acceleration sensor701 detects angular velocities. However, the 3 axes around which thegyro sensors 96 and 97 detect angular velocities may not coincide withthe 3 axes around which the acceleration sensor 701 detects angularvelocities.

In addition, the second controller 8 may be directly connected to firstcontroller 7 without attaching the gyro sensor unit 9 to the firstcontroller 7. In this case, the position and the orientation of thefirst controller 7 may be calculated based on acceleration dataoutputted from the acceleration sensor 701, instead of angular velocitydata outputted from the gyro sensor unit 9.

In addition, the above embodiment describes the case where an animationthat does not include the player object 101 having the sword object 104is displayed. However, an animation that includes the sword object 104and the player object 101 may be displayed. Alternatively, an animationthat does not include the sword object 104 and the player object 101 andthat indicates only the trajectory of the movement of the sword object104 may be displayed. That is, the first object (in the presentembodiment, the sword object 104) may not be displayed on the liquidcrystal television 2.

In addition, the above embodiment describes the case where one collisiontarget which serves as a determination area for collision determinationis set for one enemy object. However, a plurality of collision targetsmay be set for one enemy object such that the plurality of collisiontargets are placed at different positions of the one enemy object. Forexample, four collision targets are set for an enemy object such thatthe four collision targets are placed at different positions of upper,lower, right, and left positions of the enemy object.

In addition, in the above embodiment, the above game processing isrealized by using one game apparatus 3. However, the present inventionis not limited thereto. The above game processing may be realized by aplurality of information processing apparatuses working in a coordinatedmanner. That is, the function of at least one of the directiondetermination means, the collision determination means, and thecollision processing determination means may be realized by using, forexample, a server apparatus on a network other than the game apparatus3. In this case, a game system including the game apparatus 3 and theserver apparatus functions in the same manner as in the game apparatus 3described above.

Example embodiments of present invention are applicable to: acomputer-readable storage medium having stored therein a game programwhich is executed by a computer of a game apparatus which determines acollision between objects in a virtual game space and performs gameprocessing in accordance with a result of the determination; a gameapparatus; a game system; a game processing method; and the like.

While example embodiments of the invention have been described indetail, the foregoing description is in all aspects illustrative and notrestrictive. It will be understood that numerous other modifications andvariations can be devised without departing from the scope of theinvention.

1. A non-transitory computer-readable storage medium having storedtherein a game program which is executed by a computer of a gameapparatus, which game apparatus performs game processing, based on astate signal outputted by a state detection device for detecting atleast one of the position or the orientation of an input apparatus, thegame program causing the computer to provide functionality comprising: adirection determination for determining an operation direction of theinput apparatus, based on the state signal; a collision determinationfor determining whether or not a first object that acts based on thestate signal in a virtual game space will collide with a determinationtarget; and a collision processing determination for, if the collisiondetermination has determined that the first object will collide with thedetermination target, determining whether or not to perform hittingprocessing for the determination target, based on the operationdirection determined by the direction determination.
 2. Thenon-transitory computer-readable storage medium having stored thereinthe game program according to claim 1, wherein the game program causesthe computer to provide further functionality comprising: a positionrelation detection for detecting a position relation between the firstobject and the determination target in the virtual game space, and thecollision processing determination determines whether or not to performthe hitting processing for the determination target, based on theoperation direction determined by the direction determination and theposition relation detected by the position relation detection.
 3. Thenon-transitory computer-readable storage medium having stored thereinthe game program according to claim 2, wherein the game program causesthe computer to provide functionality further comprising: a priorityrank setting for, if the collision determination has determined that thefirst object will collide with a plurality of determination targets,setting priority ranks for the plurality of determination targets, basedon the operation direction determined by the direction determination andthe position relation detected by the position relation detection, andthe collision processing determination determines whether or not toperform the hitting processing for a determination target having thehighest priority rank among the plurality of determination targets. 4.The non-transitory computer-readable storage medium having storedtherein the game program according to claim 1, wherein the game programfurther causes the computer to provide functionality further comprising:a start determination for determining whether or not an operation ofswinging the input apparatus has been started, based on the statesignal, and the direction determination determines the operationdirection of the input apparatus when the start determination hasdetermined that an operation of swinging the input apparatus has beenstarted.
 5. The non transitory computer-readable storage medium havingstored therein the game program according to claim 1, wherein the statedetection device includes an angular velocity sensor, and the statesignal includes angular velocity data outputted by the angular velocitysensor.
 6. A game apparatus which performs game processing, based on astate signal outputted by a state detector for detecting at least one ofthe position or the orientation of an input apparatus, the gameapparatus comprising: a direction determination unit configured todetermine an operation direction of the input apparatus, based on thestate signal; a collision determination unit configured to determinewhether or not a first object that acts based on the state signal in avirtual game space will collide with a determination target; and acollision processing unit configured to determine, if the collisiondetermination unit has determined that the first object will collidewith the determination target, whether or not to perform hittingprocessing for the determination target, based on the operationdirection determined by the direction determination unit.
 7. A gamesystem for performing game processing, the game system comprising: astate detector configured to detect at least one of a position or anorientation of an input apparatus and output a state signal; and aprocessing system configured to perform at least: a directiondetermination for determining an operation direction of the inputapparatus, based on the state signal; a collision determination fordetermining whether or not a first object that acts based on the statesignal in a virtual game space will collide with a determination target;and a collision processing determination for, if the collisiondetermination has determined that the first object will collide with thedetermination target, determining whether or not to perform hittingprocessing for the determination target, based on the operationdirection determined by the direction determination.
 8. A gameprocessing method for performing game processing, based on a statesignal outputted by a state detector for detecting at least one of theposition or the orientation of an input apparatus, the game processingmethod comprising: determining, using a processing system including atleast one computer processor, an operation direction of the inputapparatus, based on the state signal; determining whether or not a firstobject that acts based on the state signal in a virtual game space willcollide with a determination target; and if it has been determined thatthe first object will collide with the determination target, determiningwhether or not to perform hitting processing for the determinationtarget, based on the operation direction that has been determined.
 9. Asystem comprising: a processor; storage memory having stored therein acomputer program which is executed by the processor for performingprocessing, based on a state signal outputted by a state detectiondevice for detecting at least one of a position or an orientation of aninput apparatus, the computer program causing the system to at least:determine an operation direction of the input apparatus based on thestate signal; determine whether or not a first object that acts based onthe state signal in a virtual space will collide with a second object;and determine, if a determination is made that the first object willcollide with the second object, determining whether or not to performhitting processing for the second object, based on the determinedoperation direction.
 10. The system according to claim 9, wherein thecomputer program further causes the system to: detect a positionrelation between the first object and the second object in the virtualspace, and determine whether or not to perform the hitting processingfor the second object based on the determined operation direction andthe detected position relation.
 11. The system according to claim 10,wherein the computer program further causes the system to: if adetermination is made that the first object will collide with aplurality of second objects, set priority ranks for the plurality ofsecond objects, based on the determined operation direction and thedetected position relation, and determine whether or not to perform thehitting processing for a second object having the highest priority rankamong the plurality of second objects.
 12. The system according to claim9, wherein the computer program further causes the system to: determinewhether or not an operation of swinging the input apparatus has beenstarted based on the state signal, and determine the operation directionof the input apparatus when a determination has been made that theoperation of swinging the input apparatus has been started.
 13. Thesystem according to claim 9, wherein the state detection device includesan angular velocity sensor, and the state signal includes angularvelocity data outputted by the angular velocity sensor.
 14. The systemaccording to claim 9, wherein the storage memory is a volatile memory.15. A method of performing processing, based on a state signal outputtedby a state detection device for detecting at least one of a position oran orientation of an input apparatus, the method comprising: determiningan operation direction of the input apparatus based on the state signal;determining whether or not a first object that acts based on the statesignal in a virtual space will collide with a second object; anddetermining, using a computer processor, if a determination is made thatthe first object will collide with the second object, determiningwhether or not to perform hitting processing for the second object,based on the determined operation direction.